Skip to content

Commit

Permalink
log exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Wiggins committed Nov 13, 2008
1 parent 92a5316 commit ea1ac42
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.rb
Expand Up @@ -19,6 +19,13 @@
)
end

error do
e = request.env['sinatra.error']
puts e.to_s
puts e.backtrace.join("\n")
"Application error"
end

$LOAD_PATH.unshift(File.dirname(__FILE__) + '/lib')
require 'post'

Expand Down

0 comments on commit ea1ac42

Please sign in to comment.