blob: f771e294bd55598f0ce52d9502d1275e38976444 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
'use strict';
/**
* @ngdoc function
* @name angular.module.NG.$exceptionHandler
* @requires $log
*
* @description
* Any uncaught exception in angular expressions is delegated to this service.
* The default implementation simply delegates to `$log.error` which logs it into
* the browser console.
*
* In unit tests, if `angular-mocks.js` is loaded, this service is overriden by
* {@link angular.module.NG_MOCK.$exceptionHandler mock $exceptionHandler}
*/
function $ExceptionHandlerProvider(){
this.$get = ['$log', function($log){
return function(e) {
$log.error(e);
};
}];
}
|