Skip to content

Instantly share code, notes, and snippets.

@justinobney
Created January 13, 2015 15:36
Show Gist options
  • Select an option

  • Save justinobney/6852713345453e94f10b to your computer and use it in GitHub Desktop.

Select an option

Save justinobney/6852713345453e94f10b to your computer and use it in GitHub Desktop.
$provide.decorator('$exceptionHandler', [
'$delegate', '$window', '$log', '$stateParams',
function($delegate, $window, $log, $stateParams) {
return function(exception, cause) {
if ($window.trackJs) {
$log.debug('$exceptionHandler ::: $stateParams => ', angular.toJson($stateParams));
$window.trackJs.track(exception);
}
$delegate(exception, cause);
};
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment