diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-02 23:02:22 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-02 23:02:22 -0500 |
commit | 11af089cee0a0e744e267d32becfe2c66a586d31 (patch) | |
tree | 970e6172381f5f246ffbb48b3b46c5393d56a7ec /actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb | |
parent | 1c6fcbfd2d67ce2b2faa29d956566b48e9a61188 (diff) | |
download | rails-11af089cee0a0e744e267d32becfe2c66a586d31.tar.gz rails-11af089cee0a0e744e267d32becfe2c66a586d31.tar.bz2 rails-11af089cee0a0e744e267d32becfe2c66a586d31.zip |
Extract ActionController rescue templates into Rescue and ShowExceptions middleware.
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb new file mode 100644 index 0000000000..ccfa858cce --- /dev/null +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.erb @@ -0,0 +1,10 @@ +<h1>Routing Error</h1> +<p><pre><%=h @exception.message %></pre></p> +<% unless @exception.failures.empty? %><p> + <h2>Failure reasons:</h2> + <ol> + <% @exception.failures.each do |route, reason| %> + <li><code><%=h route.inspect.gsub('\\', '') %></code> failed because <%=h reason.downcase %></li> + <% end %> + </ol> +</p><% end %> |