Class: Msf::WebServices::JsonRpcExceptionHandling::RackMiddleware
- Inherits:
-
Object
- Object
- Msf::WebServices::JsonRpcExceptionHandling::RackMiddleware
- Defined in:
- lib/msf/core/web_services/json_rpc_exception_handling.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RackMiddleware
constructor
A new instance of RackMiddleware.
Constructor Details
permalink #initialize(app) ⇒ RackMiddleware
Returns a new instance of RackMiddleware.
4 5 6 |
# File 'lib/msf/core/web_services/json_rpc_exception_handling.rb', line 4 def initialize(app) @app = app end |
Instance Method Details
permalink #call(env) ⇒ Object
[View source] [View on GitHub]
8 9 10 11 12 13 14 15 |
# File 'lib/msf/core/web_services/json_rpc_exception_handling.rb', line 8 def call(env) begin @app.call(env) rescue Exception => e req = Rack::Request.new(env) ErrorHandler.get_response(e, req) end end |