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

Fix rack.errors management #77

Merged

Conversation

jodosha
Copy link
Member

@jodosha jodosha commented Jan 20, 2015

Only dump exceptions in rack.errors if handling is turned off, or the raised exception isn't managed

Closes #74

/cc @joneslee85 and @weppos

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling fa041b2 on do-not-dump-exception-in-rack-errors-if-it-is-handled into 6c6bbe0 on master.

@jodosha jodosha self-assigned this Jan 20, 2015
@jodosha jodosha added the bug label Jan 20, 2015
@weppos
Copy link
Member

weppos commented Jan 20, 2015

👍

PS: you could have simply changed the order of the methods from

rescue => exception
  _reference_in_rack_errors(exception)
  _handle_exception(exception)
end

to

rescue => exception
  _handle_exception(exception) || _reference_in_rack_errors(exception)
end

Too magic? 😉

@runlevel5
Copy link
Member

👍

@jodosha
Copy link
Member Author

jodosha commented Jan 21, 2015

@weppos Three specs fail and yes, it's too magic ;)

@jodosha jodosha modified the milestone: v0.3.2 Jan 21, 2015
jodosha added a commit that referenced this pull request Jan 21, 2015
…s-if-it-is-handled

Fix rack.errors management
@jodosha jodosha merged commit 527451a into master Jan 21, 2015
@jodosha jodosha deleted the do-not-dump-exception-in-rack-errors-if-it-is-handled branch January 21, 2015 09:20
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.

Lotus::Action should not dump the exception if the exception is handled
4 participants