From 7dd1c751f90858cbdfaebeafed5fdf1ef400ae8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 16 Dec 2011 09:45:14 +0100 Subject: Improve the specs on exceptions app. --- actionpack/lib/action_dispatch/middleware/show_exceptions.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/middleware/show_exceptions.rb') diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index 4cfcb0a7db..5323048d90 100644 --- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb @@ -4,7 +4,12 @@ require 'active_support/deprecation' module ActionDispatch # This middleware rescues any exception returned by the application - # and wraps them in a format for the end user. + # and calls a rack application that will wrap it in a format for the end user. + # + # The rack application should be passed as parameter on initialization + # of ShowExceptions. Everytime there is an exception, ShowExceptions will + # store the exception in env["action_dispatch.exception"], rewrite the + # PATH_INFO to the exception status code and call the rack app. class ShowExceptions FAILSAFE_RESPONSE = [500, {'Content-Type' => 'text/html'}, ["

500 Internal Server Error

" << -- cgit v1.2.3