1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
David Heinemeier Hansson 2005-03-31 14:46:11 +00:00
parent e130b9e017
commit 998ab50974
5 changed files with 12 additions and 7 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Improved the message display on the exception handler pages #963 [Johan Sorensen]
* Fixed that on very rare occasions, webrick would raise a NoMethodError: private method 'split' called for nil #1001 [Flurin Egger]
* Added a wide range of new Javascript effects:

View file

@ -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 %>

View file

@ -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 %>

View file

@ -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>

View file

@ -6,7 +6,7 @@ module ActionView
#
# <%= link_to "Previous page", { :page => paginator.current.previous } if paginator.current.previous %>
#
# <%= link_to "Next page", { :page => paginator.current.next } of paginator.current.next =%>
# <%= link_to "Next page", { :page => paginator.current.next } if paginator.current.next =%>
module PaginationHelper
unless const_defined?(:DEFAULT_OPTIONS)
DEFAULT_OPTIONS = {