mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-15 05:16:41 +03:00
13 lines
341 B
TypeScript
13 lines
341 B
TypeScript
import { ErrorHandler, Injectable } from '@angular/core';
|
|
import { AppStateService } from '../services/app-state.service';
|
|
|
|
@Injectable()
|
|
export class CustomErrorHandler implements ErrorHandler {
|
|
constructor(private appState: AppStateService) {
|
|
}
|
|
handleError(error) {
|
|
console.log(error);
|
|
this.appState.error.next(error);
|
|
}
|
|
}
|