Skip to content

Instantly share code, notes, and snippets.

@Stronhold
Created February 10, 2019 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stronhold/a0496a2b6a86b2a8f7f784b8b4696328 to your computer and use it in GitHub Desktop.
Save Stronhold/a0496a2b6a86b2a8f7f784b8b4696328 to your computer and use it in GitHub Desktop.
import { Injectable, Injector } from '@angular/core';
import { Executioner } from '../model/executioner';
import { ErrorUpdate } from '../model/error-update';
import { Registry } from '../registry/registry.decorator';
import { MessageTypeEnum } from '../model/message-type.enum';
@Injectable({
providedIn: 'root'
})
@Registry(MessageTypeEnum.ConsoleError)
export class ErrorService implements Executioner{
constructor() {}
execute(data: ErrorUpdate): void {
console.error(data.message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment