-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backtrace to exceptions without backtrace. Closes #205. #206
Conversation
return exception.backtrace if exception.backtrace.respond_to?( :map ) | ||
return [] unless configuration.populate_empty_backtraces | ||
|
||
cleaned_backtrace = caller.reject {|path| path =~ /#{rollbar_gem_dir}/ } |
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.
Does this reject all rollbar frames anywhere in the stack? I think we should keep the ones that appear in the middle of the stack (i.e. our middleware).
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.
Good point @brianr.
That's the issue, if we don't clean that filenames we will always show frames from the Rollbar.error()
statement. But clean only those frames can be a little tricky.
Would you like to clean it in a smarter way? Not clean? Don't provide this feature?
@@ -363,6 +360,19 @@ def trace_data(exception) | |||
} | |||
end | |||
|
|||
def exception_backtrace(exception) |
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.
Nice. Some comments here would be helpful.
@brianr added comments and moved ruby-debug and byebug to Gemfile. |
Add backtrace to exceptions without backtrace. Closes #205.
No description provided.