Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
improve error stack traces in v8debugapi.js (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofrobots committed Jan 20, 2017
1 parent f1faef6 commit cc29b29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/agent/v8debugapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,12 @@ module.exports.create = function(logger_, config_, jsFiles_, sourcemapper_) {
}

function setErrorStatusAndCallback(fn, breakpoint, refersTo, message) {
var error = new Error(message);
return setImmediate(function() {
if (breakpoint && !breakpoint.status) {
breakpoint.status = new StatusMessage(refersTo, message, true);
}
fn(new Error(message));
fn(error);
});
}

Expand Down

0 comments on commit cc29b29

Please sign in to comment.