Skip to content
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

Merged
merged 8 commits into from
Feb 5, 2015

Conversation

jondeandres
Copy link
Contributor

No description provided.

return exception.backtrace if exception.backtrace.respond_to?( :map )
return [] unless configuration.populate_empty_backtraces

cleaned_backtrace = caller.reject {|path| path =~ /#{rollbar_gem_dir}/ }
Copy link
Member

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).

Copy link
Contributor Author

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)
Copy link
Member

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.

@jondeandres
Copy link
Contributor Author

@brianr added comments and moved ruby-debug and byebug to Gemfile.

brianr added a commit that referenced this pull request Feb 5, 2015
Add backtrace to exceptions without backtrace. Closes #205.
@brianr brianr merged commit 2fa998f into master Feb 5, 2015
@waltjones waltjones deleted the add-backtrace-to-exceptions branch June 27, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants