How do I use async_sinatra with hoptoad exception notifier?
It seems like async_sinatra swallows the exception before it 开发者_如何转开发can be passed to hoptoad.
Thanks!
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
精彩评论