1

It seems like async_sinatra swallows the exception before it can be passed to hoptoad.

Thanks!

Troy
  • 33
  • 4

1 Answers1

0

Async_sinatra provides the handle_exception! hook, which you ought to be able to use to handle the exception. Declare a function in your main Sinatra class:

def handle_exception!(boom)
  # Log, print, send to Hoptoad/Airbrake etc.
end

Source code at:

https://github.com/raggi/async_sinatra/blob/master/lib/sinatra/async.rb#L129

Dan Garland
  • 3,350
  • 1
  • 24
  • 24