Global exception handling

10 views
Skip to first unread message

Nathan Moos

unread,
Jul 2, 2015, 12:26:13 PM7/2/15
to q-con...@googlegroups.com
Hello,

At my company, we are using Q for all of our asynchronous loading. We also use Bugsnag to capture and log exceptions. Is there a way we can attach a global exception handler to all Q promises, allowing us to set Bugsnag as an error handler?

Thanks,
Nathan Moos

Kris Kowal

unread,
Jul 7, 2015, 2:18:28 PM7/7/15
to Q Continuum
Q has an onerror hook. Just assign a function to Q.onerror. This will report any exception that gets to a .done() without having been handled.

--
You received this message because you are subscribed to the Google Groups "Q Continuum (JavaScript)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to q-continuum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages