Project

General

Profile

1
/**
2
 * @whatItDoes Provides a hook for centralized exception handling.
3
 *
4
 * @description
5
 *
6
 * The default implementation of `ErrorHandler` prints error messages to the `console`. To
7
 * intercept error handling, write a custom exception handler that replaces this default as
8
 * appropriate for your app.
9
 *
10
 * ### Example
11
 *
12
 * ```
13
 * class MyErrorHandler implements ErrorHandler {
14
 *   handleError(error) {
15
 *     // do something with the exception
16
 *   }
17
 * }
18
 *
19
 * @NgModule({
20
 *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
21
 * })
22
 * class MyModule {}
23
 * ```
24
 *
25
 * @stable
26
 */
27
export declare class ErrorHandler {
28
    constructor(
29
        /**
30
         * @deprecated since v4.0 parameter no longer has an effect, as ErrorHandler will never
31
         * rethrow.
32
         */
33
        deprecatedParameter?: boolean);
34
    handleError(error: any): void;
35
}
36
export declare function wrappedError(message: string, originalError: any): Error;
(11-11/22)