aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/misc/started.ngdoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/misc/started.ngdoc')
0 files changed, 0 insertions, 0 deletions
"> * angular.module('exceptionOverride', []).factory('$exceptionHandler', function () { * return function (exception, cause) { * exception.message += ' (caused by "' + cause + '")'; * throw exception; * }; * }); * </pre> * * This example will override the normal action of `$exceptionHandler`, to make angular * exceptions fail hard when they happen, instead of just logging to the console. * * @param {Error} exception Exception associated with the error. * @param {string=} cause optional information about the context in which * the error was thrown. * */ function $ExceptionHandlerProvider() { this.$get = ['$log', function($log) { return function(exception, cause) { $log.error.apply($log, arguments); }; }]; }