The example below will overwrite the default $exceptionHandler in order to (a) log uncaught errors to the backend for later inspection by the developers and (b) to use $log.warn() instead of $log.error().
By using this $exceptionHandler the errors will display clear,
angular.module('test').factory('$exceptionHandler', function() { return function(exception, cause) { exception.message += 'Angular Exception: "' + cause + '"'; throw exception; }; } );
You might also like:
How to insert bulk information into database in single query execution18-03-2017 insert sql bulk database |
Remove last two characters from given string06-03-2017 substring javascript remove |
How to find Angular Errors06-03-2017 errors angularjs exceptionHandler |
Filter for insert HTML in Angular Js06-03-2017 filter show html angular js html |
How to set or update or push the values into Object in javacript27-02-2017 javascript set update push object |