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

Inspect error to get message + class name #67

merged 1 commit into from
Oct 5, 2015

Conversation

rib3
Copy link
Contributor

@rib3 rib3 commented Aug 24, 2015

Use .inspect to log the message in addition to the class name.

Currently:

An unknown error occurred:  RuntimeError

@anfleene
Copy link

:shipit:

@rib3
Copy link
Contributor Author

rib3 commented Aug 24, 2015

Merge it? Does it need to be republished after?

@anfleene
Copy link

yeah. I can give you publish access tomorrow

rib3 added a commit that referenced this pull request Oct 5, 2015
Inspect error to get message + class name
@rib3 rib3 merged commit 7be67d5 into master Oct 5, 2015
@@ -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.

@emmahsax emmahsax deleted the known-unknowns branch July 14, 2020 07:59
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.

None yet

3 participants