Skip to content

Commit

Permalink
Get the original exception in DebugExceptions monkey patch
Browse files Browse the repository at this point in the history
  • Loading branch information
gsamokovarov committed Nov 24, 2014
1 parent d6c57bd commit 1312c70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/web_console/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ class Engine < ::Rails::Engine
ActionDispatch::DebugExceptions.class_eval do
def render_exception_with_web_console(env, exception)
render_exception_without_web_console(env, exception).tap do
env['web_console.exception'] = exception
wrapper = ActionDispatch::ExceptionWrapper.new(env, exception)

# Get the original exception if ExceptionWrapper decides to follow it.
env['web_console.exception'] = wrapper.exception
end
end

Expand Down

0 comments on commit 1312c70

Please sign in to comment.