3 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
4 <title><%= @exception_name %></title>
5 <style type="text/css" media="screen">
20 h1 sup.error_500, h1 sup.error_400 {
23 h1 sup.error_100, h1 sup.error_200 {
27 /* pretty sure you cant 'see' status 300
28 errors but if you could I think they
47 border-bottom:10px solid #333;
49 background-image: url("data:image/gif;base64,R0lGODlhAwADAIAAAP///8zMzCH5BAAAAAAALAAAAAADAAMAAAIEBHIJBQA7");
54 font-family:courier, monospace;
56 border-collapse: collapse;
63 vertical-align:middle;
66 border-top:2px solid #fff;
67 background-color:#F3F3F3;
69 table.trace tr.source {
70 background-color:#F8F8F8;
73 table.trace .open tr.source {
76 table.trace tr.file td.expand {
78 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAXCAIAAABvSEP3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdVJREFUeNqMVL+TwUAYxaRIOlEhlZHGDAUzzOQ61+AqXMV1lJSU7q/QRqm8KFUcJTNn5qJkaPyoKKVz7y4mF8na5Kt29tt9+/Z97/u81+vVQ4r9frdarS6Xi7ETDIZisRjxMGPfmk4niNPpZE+xLAugbPaZ53nzvtfMBe/3+/3dbuehBrAKhZdUKkVAWa9Xsiybv0CPZDJZLr/qa5/BwgwRjYqOKIvFYjQa/aNommZh0Ww2K5UqzwfoQOPxaLPZ3FAmk0+7lplMpt1u53J5OpBOR0eZEE9wHJfP5zud93g88QhluwWbjW+5VOmKBgKBer3eaDTDYeGBQF8+x7rqIYoiPgixWJazpA6HA+MSxRArkUgMh0M409g8Ho8+9wYxxCqVSq1W26EDHGM2m4HOHQrEc38f/Yn7cLmlIRhBENzcx8cVRZnPZ/YUep2BWkjTIfA+PKVpZAXR5QxsjiqCKvGEqqp443w+0dvy17swqD0HB3S73V5PpkNg1qBqt8kwGCjmPkinM0QJbIoEa7U6UG6ToVgs4V9G2g0ESoP5Aoi7KYX5oCgf8IKbkvn9/mr1LRQKESamzgJy0g0tSZIuB3nuGqRU9Vv9C4sKkUhEkp4soxvxI8AAhWrrtXa3X8EAAAAASUVORK5CYII=);
79 background-position:top left;
80 background-repeat:no-repeat;
82 table.trace .open tr.file td.expand {
84 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXZJREFUeNrslK1ywkAUhcMOBomEOiSdqLxEBJX0NaijOsjyHGGmCGyQQYaiiiw4gktkcOmZbpsuuzQ/M5XnqJ2d3S/n3nM3rTzPLUP7/Tt0+pLcGQwG3W53OLyHzPMtjYL7q9UqSRLrD4E1Gj1orCvKYuFHUWTVkOM44/HjDcp8/lL4r6NerzeZPMm1KFw0QkDn83m5fP2lHA4fNQvRtNvtjsfDd0WzmSfb2e/fdTqdOvdh/HLJZLOn0+d2HJ+KRGzbdl23EpFlmed5cp2maRzHQq1lvQ5KMi6EUZBGfup6E1pTfd+vrGW7jbQ2C9hTt9BpqNyIWaAwAy6xg2eBz5iRC/NomiZhGN5sqmnkauo0BUGgVQoBjQ80oCACgNQdZHfTYBkF2mxCtWWAqunWpahxIDUt3QYUxIFQpJHyIWpXjinabKbbwItMHT+NyjchrP8QKaSQQgoppJBCCimkkEIKKaSQQgoppJBCCimkkEIKKaSo+hRgAEFD17X08O2NAAAAAElFTkSuQmCC);
85 background-position:top left;
86 background-repeat:no-repeat;
88 table.trace tr.source td.collapse {
90 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAVxJREFUeNrs0zFygkAUBmBlUkgJHdABlQwVkVJKKUxBYWbkALTxMJwhltyDFkss03IF8pudIcwaDaDl/6pd2P327b7d+eHwMXs4lNkzggoVKlSoUKFChQoVKlSoUKFChQoVKlSoUKFChQqVEYqm6ft9+qiSJEkYho7jTlcw2fd9NOI4nq4gEdFwXXe1Cqco63VkWVbXRTqLhTpOwQRpF7quR1E0TgGhqvLKUFCyoQqG/rks3O6kZKW/eRFpevOCoGTXVTcMQ5EyxyDEkML1c5RzuZOICIyXqn7JBVez6282MWrx731HOv2qB8Hri2lamNk0DfpVVdV1Peodappmmua8bdvzuc7zfNprzrLMth1FnGh/X8MjCAIQv/cFz/+65PcDh7rbvYv2ZUfdj+PxsyzLgVl0hKwgTqeqKApx2LeOc7t98zyv/1FWOgvx9RPii23bmL9cetJ8Ed8CDAC6aFW8bCzFhwAAAABJRU5ErkJggg==);
91 background-position:bottom left;
92 background-repeat:no-repeat;
93 background-color:#6F706F;
95 table.trace tr td.path {
98 table.trace tr td.code {
104 table.trace tr td.code em {
108 table.trace tr td.code a {
112 table.trace tr td.code .more {
115 table.trace tr td.line {
129 <div class="internalError">
132 <h1><%= @exception_name %> <sup class="error_<%= @exception.class::STATUS %>"><%= @exception.class::STATUS %></sup></h1>
133 <% if show_details = ::Merb::Config[:exception_details] -%>
134 <h2><%= @exception.message %></h2>
136 <h2>Sorry about that...</h2>
140 <% params[:original_params].each do |param, value| %>
141 <li><strong><%= param %>:</strong> <%= value.inspect %></li>
143 <%= "<li>None</li>" if params[:original_params].empty? %>
148 <% params[:original_session].each do |param, value| %>
149 <li><strong><%= param %>:</strong> <%= value.inspect %></li>
151 <%= "<li>None</li>" if params[:original_session].empty? %>
156 <% params[:original_cookies].each do |param, value| %>
157 <li><strong><%= param %>:</strong> <%= value.inspect %></li>
159 <%= "<li>None</li>" if params[:original_cookies].empty? %>
163 <% if show_details %>
164 <table class="trace">
165 <% @exception.backtrace.each_with_index do |line, index| %>
166 <tbody class="close">
171 <%= (line.match(/^([^:]+)/)[1] rescue 'unknown').sub(/\/((opt|usr)\/local\/lib\/(ruby\/)?(gems\/)?(1.8\/)?(gems\/)?|.+\/app\/)/, '') %>
172 <% unless line.match(/\.erb:/) %>
173 in "<strong><%= line.match(/:in `(.+)'$/)[1] rescue '?' %></strong>"
175 (<strong>ERB Template</strong>)
179 <a href="txmt://open?url=file://<%=file = (line.match(/^([^:]+)/)[1] rescue 'unknown')%>&line=<%= lineno = line.match(/:([0-9]+):/)[1] rescue '?' %>"><%=lineno%></a>
183 <td class="collapse">
185 <td class="code" colspan="2"><% (__caller_lines__(file, lineno, 5) rescue []).each do |llineno, lcode, lcurrent| %>
186 <a href="txmt://open?url=file://<%=file%>&line=<%=llineno%>"><%= llineno %></a><%='<em>' if llineno==lineno.to_i %><%= lcode.size > 90 ? CGI.escapeHTML(lcode[0..90])+'<span class="more">......</span>' : CGI.escapeHTML(lcode) %><%='</em>' if llineno==lineno.to_i %>
194 <script type="text/javascript" charset="utf-8">
195 // swop the open & closed classes
196 els = document.getElementsByTagName('td');
197 for(i=0; i<els.length; i++){
198 if(els[i].className=='expand' || els[i].className=='collapse'){
199 els[i].onclick = function(e){
200 tbody = this.parentNode.parentNode;
201 if(tbody.className=='open'){
202 tbody.className='closed';
204 tbody.className='open';
212 lots of love, from <a href="#">merb</a>