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

Inspect error to get message + class name #67

Merged
merged 1 commit into from
Oct 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/octopolo/pull_request_merger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def perform
when GitHub::PullRequest::CommentFailed
cli.say "Unable to write comment. Please navigate to #{pull_request.url} and add the comment, '#{comment_body}'"
else
cli.say "An unknown error occurred: #{e.class.to_s}"
cli.say "An unknown error occurred: #{e.inspect}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to output e.backtrace too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, IMO it should, but that's a greater argument about how user vs developer friendly the tool is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, maybe there should just be individual rescue statements for each handled error type, and then allow anything else to "break through" and produce a "natural" stack trace.

end
false
end
Expand Down