Last active
October 6, 2016 15:47
-
-
Save amatiasq/9800465290f23488e199 to your computer and use it in GitHub Desktop.
Listen to Raygun errors from angular app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//cdn.raygun.io/raygun4js/raygun.min.js"></script> | |
<script> | |
Raygun.init('<TOKEN>', { | |
excludedHostnames: ['localhost'], | |
}) | |
.attach() | |
.withCustomData(function() { | |
return { | |
hash: document.location.hash, | |
}; | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.config(function($provide) { | |
$provide.decorator('$exceptionHandler', function($delegate) { | |
return function (exception, cause) { | |
window.Raygun.send(exception); | |
$delegate(exception, cause); | |
}; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment