Skip to content

Instantly share code, notes, and snippets.

@kkurni
Created May 1, 2014 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkurni/eeae51aab2a7b3554554 to your computer and use it in GitHub Desktop.
Save kkurni/eeae51aab2a7b3554554 to your computer and use it in GitHub Desktop.
errorception handler for angularjs
app.factory('$exceptionHandler', function ($log) {
return function (exception, cause) {
exception.message += ' (caused by "' + cause + '")';
$log.error(exception);
throw exception;
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment