Module: Sinatra::Async::Helpers
- Defined in:
- lib/arachni/ui/web/server.rb
Instance Method Summary collapse
Instance Method Details
#async_handle_exception ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/arachni/ui/web/server.rb', line 32 def async_handle_exception yield rescue ::Exception => boom if respond_to? :aerror aerror boom elsif settings.show_exceptions? printer = Sinatra::ShowExceptions.new( proc{ raise boom } ) s, h, b = printer.call( request.env ) response.status = s response.headers.replace( h ) response.body = b else body( handle_exception!( boom ) ) end end |