开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜