Permalink
Browse files

tighter sinatra support

  • Loading branch information...
1 parent cf94171 commit 654f50e9cb53a38267510b22f68a35b1d16a9927 @wal wal committed Jan 27, 2010
Showing with 8 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +1 −0 lib/exceptional.rb
  3. +6 −0 lib/exceptional/integration/sinatra.rb
View
@@ -5,3 +5,4 @@ exceptional-*.gem
doc
log
pkg/*
+_site
View
@@ -10,6 +10,7 @@
require 'exceptional/rack_exception_data'
require 'exceptional/remote'
require 'exceptional/integration/rack'
+require 'exceptional/integration/sinatra'
require 'exceptional/version'
module Exceptional
@@ -0,0 +1,6 @@
+if defined? Sinatra::Request
+ error do
+ Exceptional.handle_with_rack(request.env['sinatra.error'], request.env, request)
+ raise request.env['sinatra.error']
+ end
+end

0 comments on commit 654f50e

Please sign in to comment.