Class: ProxyTester::Actions::HandleError
- Inherits:
-
Object
- Object
- ProxyTester::Actions::HandleError
- Defined in:
- lib/proxy_tester/handle_error.rb,
lib/proxy_tester/actions/handle_error.rb
Instance Method Summary collapse
-
#initialize(exception, handler_klass = ErrorHandler) ⇒ HandleError
constructor
A new instance of HandleError.
- #run ⇒ Object
Constructor Details
#initialize(exception, handler_klass = ErrorHandler) ⇒ HandleError
Returns a new instance of HandleError.
12 13 14 15 16 |
# File 'lib/proxy_tester/handle_error.rb', line 12 def initialize(exception, handler_klass = ErrorHandler) @exception = exception.class @original_message = exception. @handler_klass = handler_klass end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 |
# File 'lib/proxy_tester/handle_error.rb', line 18 def run handler = handler_klass.find exception handler. = handler.execute() end |