ExceptionHandler

export class ExceptionHandler

exported from angular2/core defined in angular2/src/facade/exception_handler.ts (line 11)

Provides a hook for centralized exception handling.

The default implementation of ExceptionHandler prints error messages to the Console. To intercept error handling, write a custom exception handler that replaces this default as appropriate for your app.

Example

class MyExceptionHandler implements ExceptionHandler { call(error, stackTrace = null, reason = null) { // do something with the exception } } bootstrap(MyApp, [provide(ExceptionHandler, {useClass: MyExceptionHandler})])

Constructor

constructor(_logger: any, _rethrowException?: boolean)

Not Yet Documented

Members

call(exception: any, stackTrace?: any, reason?: string) : void

Not Yet Documented