Permalink
Browse files

error page

  • Loading branch information...
blake.mizerany@gmail.com
blake.mizerany@gmail.com committed Sep 25, 2007
1 parent 44d65cb commit 05d0c82e353162eaf081a08e7ce76c5231855cb7
Showing with 12 additions and 1 deletion.
  1. +9 −0 files/error.erb
  2. +3 −1 lib/sinatra/event.rb
View
@@ -0,0 +1,9 @@
+<h2>Error!</h2>
+
+<h3>
+<%= @error.message %>
+</h3>
+
+<div id="backtrace">
+<%= @error.backtrace.join('<br/>') %>
+</div>
View
@@ -64,8 +64,10 @@ def body(value = nil, &block)
def error(value = nil)
if value
- @error = value
status 500
+ @error = value
+ views_dir SINATRA_ROOT + '/files/'
+ erb :error
end
@error
end

0 comments on commit 05d0c82

Please sign in to comment.