Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Injectable()
- export class GlobalErrorHandler implements ErrorHandler {
- private errorLogService: ErrorLogService;
- constructor(
- errorLogService: ErrorLogService) {
- this.errorLogService = errorLogService;
- }
- public handleError( error: any ) : void {
- // Log to the console.
- try {
- console.error( error.message );
- console.error( error.stack );
- } catch ( handlingError ) {
- console.error( handlingError );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement