Skip to content

Commit 38aefb4

Browse files
committed
expose original uncaughtException to patchGlobal callback, ref #28
1 parent 78476dc commit 38aefb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ module.exports.patchGlobal = function patchGlobal(client, cb) {
158158
process.on('uncaughtException', function(err) {
159159
if(cb) { // bind event listeners only if a callback was supplied
160160
client.once('logged', function() {
161-
cb(true);
161+
cb(true, err);
162162
});
163163
client.once('error', function() {
164-
cb(false);
164+
cb(false, err);
165165
});
166166
}
167167
client.captureError(err, function(result) {

0 commit comments

Comments
 (0)