Changeset 4955
- Timestamp:
- 09/03/06 23:51:34 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/rescue.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4954 r4955 1 1 *SVN* 2 3 * Changed that uncaught exceptions raised any where in the application will cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [DHH] 2 4 3 5 * Integration tests: thoroughly test ActionController::Integration::Session. #6022 [Kevin Clark] trunk/actionpack/lib/action_controller/rescue.rb
r4885 r4955 49 49 def rescue_action_in_public(exception) #:doc: 50 50 case exception 51 when RoutingError, UnknownAction then51 when RoutingError, UnknownAction 52 52 render_text(IO.read(File.join(RAILS_ROOT, 'public', '404.html')), "404 Not Found") 53 else render_text "<html><body><h1>Application error (Rails)</h1></body></html>" 53 else 54 render_text(IO.read(File.join(RAILS_ROOT, 'public', '500.html')), "500 Internal Error") 54 55 end 55 56 end … … 126 127 def response_code_for_rescue(exception) 127 128 case exception 128 when UnknownAction, RoutingError then "404 Page Not Found" 129 else "500 Internal Error" 129 when UnknownAction, RoutingError 130 "404 Page Not Found" 131 else 132 "500 Internal Error" 130 133 end 131 134 end