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

Guarantees specific error_handler catch was called against a more #120

Merged
merged 1 commit into from Aug 25, 2015
Merged

Guarantees specific error_handler catch was called against a more #120

merged 1 commit into from Aug 25, 2015

Conversation

manuwell
Copy link
Contributor

Hi guys,

I made a mistake on my last PR. When you have a stack of error_handlers from more specific errors to more generic error catcher, the last one always be called.

This PR fixes it.

Sorry by my mistake.

@theocodes
Copy link

@manuwell does this have anything to do with the failing assertion on action_test.rb:53?

1) Failure:
Lotus::Action::#call::when exception handling code is enabled#test_0002_handles inherited exception with specified method [/Users/theocodes/work/lotus/controller/test/action_test.rb:53]:
--- expected
+++ actual
@@ -1 +1 @@
-["An inherited exception occurred!"]
+["Please go away!"]

@manuwell
Copy link
Contributor Author

yes it is

@theocodes
Copy link

Cool thanks


private
def handler(exception)
status 501, 'MyCustomError was throwed'
Copy link
Member

Choose a reason for hiding this comment

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

s/throwed/thrown

@runlevel5 runlevel5 added the bug label Aug 19, 2015
@runlevel5 runlevel5 added this to the v0.5.0 milestone Aug 19, 2015
end

def standard_handler(exception)
status 501, 'An unknown error was throwed'
Copy link
Member

Choose a reason for hiding this comment

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

s/throwed/thrown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed o/

thks

Copy link
Member

Choose a reason for hiding this comment

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

pls push

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its pushed ;)

Copy link
Member

Choose a reason for hiding this comment

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

please do force push

@manuwell
Copy link
Contributor Author

Sorry again .. I forgot to push some changes =P

But i think is fine now o/

runlevel5 pushed a commit that referenced this pull request Aug 25, 2015
Guarantees specific error_handler catch was called against a more
@runlevel5 runlevel5 merged commit 018d6f3 into hanami:master Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants