Callback to all methods triggering a send
See original GitHub issueAt the moment I’m trying to integrate raven-js into our webapp, but I have hit a roadblock. The application is mostly single page, but at some points it navigates to other sites, especially in some error cases. So what I end up with is code similar to this:
try {
doSomeCrazyThingThatMightFail()
} catch (err) {
Raven.captureException(e)
window.location.url = 'my.error.page.com'
}
The issue here is that this fails to report the error, as the sending of the report happens asynchronously. What I’m looking for is something like this:
Raven.captureException(e, function () {
// We are save the exception was sent over the network
window.location.url = 'my.error.page.com'
})
Looking at the code/docs I could not find the ability to do this, but maybe I missed something.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Understanding Callback Methods with Examples - OneSpan
In this example we will explain the concept of creating a callback in four steps: First, Create a callback interface and declare inside...
Read more >Mastering 'this' in JavaScript: Callbacks and bind(), apply(), call()
A callback function is a lucky function that gets passed into the enclosing higher-order function: The callback function gets executed (called) ...
Read more >Trigger callback on form submit - javascript - Stack Overflow
The submit event only fires when the user clicks a submit button ( or ) in a form. The event is not raised...
Read more >Automatically provided arguments in JavaScript callback ...
With callback functions on JavaScript methods, the arguments are automatically passed in by the method itself. Using the Array. forEach() ...
Read more >Callback API - Metamug
APIs send data when requested, but callbacks can send data when an event is triggered to the callback url. So the client doesn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jmahony not yet, we’ll announce the release somewhere at the end of Q3
In the meantime for anyone else interested this works, although I can’t say it’s super fantastic: