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

Commit cc29b29

Browse files
authored
improve error stack traces in v8debugapi.js (#222)
1 parent f1faef6 commit cc29b29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/agent/v8debugapi.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,12 @@ module.exports.create = function(logger_, config_, jsFiles_, sourcemapper_) {
575575
}
576576

577577
function setErrorStatusAndCallback(fn, breakpoint, refersTo, message) {
578+
var error = new Error(message);
578579
return setImmediate(function() {
579580
if (breakpoint && !breakpoint.status) {
580581
breakpoint.status = new StatusMessage(refersTo, message, true);
581582
}
582-
fn(new Error(message));
583+
fn(error);
583584
});
584585
}
585586

0 commit comments

Comments
 (0)