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

Handle the highest priority exceptions in the cause chain #30601

Closed
wants to merge 2 commits into from

Conversation

rinmu
Copy link

@rinmu rinmu commented Sep 14, 2017

Change to handle the highest priority exception in the exception cause chain.
rescue_from handler that are defined later have higher priority.
The priority does not depend on outside or inside of composition relation by Exception#cause.

Fixes #29739

@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @eileencodes (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.

Please see the contribution instructions for more information.

@eileencodes
Copy link
Member

cc/ @matthewd since you commented on the original issue.

Copy link
Member

@matthewd matthewd left a comment

Choose a reason for hiding this comment

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

As I stated in my comment, the change was deliberate.

I also described a change I think we should make. This is not that.

@rinmu
Copy link
Author

rinmu commented Sep 15, 2017

@matthewd I'm sorry, I seem to misunderstood your comment.
I have understood that the change was intentional.

Does that mean that we should continue to put a patch like @TurtleKitty commented on #29739 in the future?
Or is there a way to solve our problem while keeping the change intention?
Unfortunately I have no idea.
If I got that suggestion, I will change this PR.

@matthewd
Copy link
Member

in the specific case of ActionView::Template::Error [..] we do want different something different:

  • If the application has explicitly defined a handler for ActionView::Template::Error, that should of course be invoked.
  • But otherwise, it should hit a specific handler inside the framework, which will unwrap and focus on the cause.

@rinmu
Copy link
Author

rinmu commented Sep 15, 2017

Because the change contents are greatly different, I made another PR #30613.

@rinmu rinmu closed this Sep 15, 2017
@rinmu rinmu deleted the change_cause_handling branch September 15, 2017 17:33
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

4 participants