aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/templates
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-31 14:46:11 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-31 14:46:11 +0000
commit998ab50974403ddc1cd166a3fe97528d344b1db4 (patch)
treeacb0d3f143478efbdac647d38ae7d1998144e3b6 /actionpack/lib/action_controller/templates
parente130b9e01784ac8c5d4743fa121a9d5e3618e151 (diff)
downloadrails-998ab50974403ddc1cd166a3fe97528d344b1db4.tar.gz
rails-998ab50974403ddc1cd166a3fe97528d344b1db4.tar.bz2
rails-998ab50974403ddc1cd166a3fe97528d344b1db4.zip
Improved the message display on the exception handler pages #963 [Johan Sorensen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1048 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/templates')
-rw-r--r--actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml2
-rw-r--r--actionpack/lib/action_controller/templates/rescues/routing_error.rhtml6
-rw-r--r--actionpack/lib/action_controller/templates/rescues/template_error.rhtml7
3 files changed, 9 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml b/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
index 9fb2de5b10..80634b2d34 100644
--- a/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
@@ -8,7 +8,7 @@
<%=h @exception.class.to_s %> in
<%=h (@request.parameters["controller"] || "<controller not set>").capitalize %>#<%=h @request.parameters["action"] || "<action not set>" %>
</h1>
-<p><%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %></p>
+<pre><%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %></pre>
<% unless app_trace.empty? %><pre><code><%=h app_trace.join("\n") %></code></pre><% end %>
diff --git a/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml b/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml
index 82c01e10c9..bf7dcb232a 100644
--- a/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/routing_error.rhtml
@@ -1,8 +1,10 @@
<h1>Routing Error</h1>
-<p><%=h @exception.message %></p>
+<p><pre><%=h @exception.message %></pre></p>
<% unless @exception.failures.empty? %><p>
<h2>Failure reasons:</h2>
+ <ol>
<% @exception.failures.each do |route, reason| %>
- <%=h route.inspect.gsub('\\', '') %> failed because <%=h reason.downcase %><br />
+ <li><code><%=h route.inspect.gsub('\\', '') %></code> failed because <%=h reason.downcase %></li>
<% end %>
+ </ol>
</p><% end %>
diff --git a/actionpack/lib/action_controller/templates/rescues/template_error.rhtml b/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
index 405a2e070a..9a331b9bf2 100644
--- a/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/template_error.rhtml
@@ -4,11 +4,12 @@
</h1>
<p>
- Showing <i><%=h @exception.file_name %></i> where line <b>#<%=h @exception.line_number %></b> raised
- <u><%=h @exception.message %></u>
+ Showing <i><%=h @exception.file_name %></i> where line <b>#<%=h @exception.line_number %></b> raised:
+ <pre><code><%=h @exception.message %></code></pre>
</p>
-<pre><code><%=h @exception.source_extract %></code></pre>
+<p>Extracted source (around line <b>#<%=h @exception.line_number %></b>):
+<pre><code><%=h @exception.source_extract %></code></pre></p>
<p><%=h @exception.sub_template_message %></p>