Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 4x 4x 4x 25x 4x 4x | import { ErrorHandler, Injectable, Injector } from '@angular/core';
import { LoggingService } from '../api/logging.service';
@Injectable()
export class JsErrorHandler implements ErrorHandler {
constructor(private injector: Injector) {}
handleError(error) {
const loggingService = this.injector.get(LoggingService);
const url = window.location.href;
const message = error && error.message;
const stack = error && error.stack;
loggingService.jsError(url, message, stack).subscribe();
throw error;
}
}
|