<style>
<!--

* {    font-size:    9pt;    font-family:    verdana, helvetica, arial, sans-serif; line-height: 1.7em; }
p { margin: 0 }
-->
</style>
<h2>Error report from <%= Time.now %></h2>

<table border="0">
<tr><td>Message</td><td><%= @exception.message %></td></tr>
<tr><td>Location</td><td><%= @env['REQUEST_URI'] %></td></tr>
<tr><td>Action</td><td><%= @params.delete('action') %></td></tr>
<tr><td>Controller</td><td><%= @params.delete('controller') %></td></tr>
<tr><td>Query</td><td><%= @env['QUERY_STRING'] %></td></tr>
<tr><td>Method</td><td><%= @env['REQUEST_METHOD'] %></td></tr>
<tr><td>SSL</td><td><%= @env['SERVER_PORT'].to_i == 443 ? "true" : "false"  %></td></tr>
<tr><td>Agent</td><td><%= @env['HTTP_USER_AGENT']  %></td></tr>
</table>

<h3>Backtrace</h3>
<div><%= @trace.to_a.join("</p>\n<p>") -%></div>

<h3>Params</h3>
<hr/>
<% for key, val in @params -%>
<p><b><%= key %></b></p>
<p><%= val.inspect.gsub(/password:.*/, 'password: ****') %></p>
<% end if @params -%>

<h3>Session</h3>
<hr/>
<% for key, val in @session -%>
<p><b><%= key %></b></p>
<p><%= val.to_yaml.to_a.join("</p>\n<p>    ").gsub(/password:.*/, 'password: ****') %></p>
<% end if @session -%>

<h3>Environment</h3>
<hr/>
<table border="0">
<% for key, val in @env -%>
<tr>
  <td>
    <small><b><%= key %></b></small>

  </td>
  <td>
    <small><%= val %></small>
  </td>
</tr>
<% end if @env -%>
</table>
