$exceptionHandler

Error handling service

Description

$exceptionHandler is the central hook for uncaught exceptions inside an AngularTS application. The framework routes all errors from synchronous code, async tasks, expression evaluation, and dependency injection through this service.

By default, it rethrows exceptions that occur during AngularTS-managed execution. This fail-fast behavior ensures errors are visible immediately in development and in unit tests.

For type description, see ng.ExceptionHandler.

For service customisation, see ng.ExceptionHandlerProvider