Lance Hardwood
Lance Hardwood

Reputation: 790

Global exception handling

Is it possible to globally catch exceptions thrown in an Angular 2 application to prevent the entire app from breaking from errors in any one component?

Upvotes: 45

Views: 20698

Answers (1)

Saulfa
Saulfa

Reputation: 416

As google explain, you can override error handler service to do what you want. https://angular.io/docs/ts/latest/api/core/index/ErrorHandler-class.html

Upvotes: 40

Related Questions