https://github.com/hypery2k/angular-errorhandler
DEPRECATED, use
https://github.com/hypery2k/angular-errorhandler
Last synced: 3 months ago
JSON representation
DEPRECATED, use
- Host: GitHub
- URL: https://github.com/hypery2k/angular-errorhandler
- Owner: hypery2k
- License: mit
- Created: 2015-07-22T08:31:09.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:34:02.000Z (over 1 year ago)
- Last Synced: 2024-05-16T23:01:24.346Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://github.com/hypery2k/angular-invocation-handler
- Size: 34.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-errorhandler
[](https://greenkeeper.io/)
> A module for collecting errors, stack traces and other information globally from within your Angular app
> e.g. for saving to a remote service or for displaying[](https://travis-ci.org/hypery2k/angular-errorhandler)

[](https://david-dm.org/hypery2k/angular-errorhandler#info=devDependencies)##### Reasons to use
It's anyoing to handle all errors in controller and service and also very defective.
So instead of surfacing the log it would be cool to manage them at a central place and maybe store them via on a backend service##### Usage
Install this module:
```
bower install angular-errorhandler --save
```Add the dependencies
```
/*global app: true*/
var app = angular.module('resourcesApp', [
...
'ngErrorHandler.core',
'ngErrorHandler.ui' // optional
]);
```If you like to display the error message within your app, also include the ui module.
Configure the service to be handled:
```
app.config(function ($provide, errorHandlerServiceProvider, errorHandlerConfig) {
'use strict';// enable UI feedback attach
errorHandlerConfig.feedbackAttach = true;
errorHandlerConfig.customErrorHandler = 'errorHandlingService';
// decorate the mentioned [services] with automatic error handling.
errorHandlerServiceProvider.decorate($provide, ['eventService']);
});```
### About
This module instruments Angular's `interceptors` to invoke a configurable set for the error handling.