@nhaancs/error-handling
v0.0.5
Published
This module is for automatically handling errors in application, it override the default behaviors of the ErrorHandler provided by Angular.
Downloads
13
Readme
error-handling
This module is for automatically handling errors in application, it override the default behaviors of the ErrorHandler provided by Angular.
Example Usage
You only need to import this module to your app and replace the default error handler with ErrorHandlingService. Our new service will automatically handle when new error occurs.
@NgModule({
...
imports: [
...
ErrorHandlingModule,
],
providers: [
...
{
// replace default error handler with ErrorHandlingService
provide: ErrorHandler,
useClass: ErrorHandlingService,
deps: [ConfigurationService, LoggingService],
},
]
})
Notes on tsconfig.json
...
"angularCompilerOptions": {
// publishable library cannot build with ivy
"enableIvy": false
},
...
This library was generated with Nx.
Running unit tests
Run nx test error-handling
to execute the unit tests.