-
Notifications
You must be signed in to change notification settings - Fork 47
push frames without context on file read errors in the parser #22
push frames without context on file read errors in the parser #22
Conversation
Hey @dan-manges , sorry for the delay, will try to find some time to review and merge today. |
@@ -106,7 +106,7 @@ exports.parseStack = function(stack, callback) { | |||
try { | |||
if (err2) { | |||
console.error('could not read in file ' + frame.filename + ' for context'); | |||
return looper(err2); | |||
return pendingCallback(err2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any particular reason you did this instead of:
frames.push(frame);
return;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er,
frames.push(frame);
return looper(null);
I think I'm going to merge as-is for now, but wanted to mention.
Merged, thanks! This will get pushed to npm in 0.3.3, which will be later today. |
Thanks for merging this @brianr. I think the only reason I called
I thought that maybe the intent was to have all error handling flow into that logic branch but somebody accidentally called |
@coryvirok do you have an opinion here? |
@dan-manges, thanks for the fix. @brianr, I prefer the way @dan-manges has it here so we only handle the error case in 1 place. This code is way too complicated. I'll file a task to refactor. |
I think the intention on file read errors is to push the frame without context. There's a comment in the parser that says:
However, because
looper
was being called instead ofpendingCallback
, an error reading a file is causing rollbar to bubble the exception up through all the callbacks and never notify.