1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

error page

This commit is contained in:
blake.mizerany@gmail.com 2007-09-25 17:42:13 +00:00
parent 44d65cb089
commit 05d0c82e35
2 changed files with 12 additions and 1 deletions

9
files/error.erb Normal file
View file

@ -0,0 +1,9 @@
<h2>Error!</h2>
<h3>
<%= @error.message %>
</h3>
<div id="backtrace">
<%= @error.backtrace.join('<br/>') %>
</div>

View file

@ -64,8 +64,10 @@ module Sinatra
def error(value = nil)
if value
@error = value
status 500
@error = value
views_dir SINATRA_ROOT + '/files/'
erb :error
end
@error
end