Exception: ActiveInteractor::Error
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveInteractor::Error
- Defined in:
- lib/active_interactor/errors.rb
Overview
Raised when an interactor fails
Instance Attribute Summary collapse
-
#result ⇒ ActiveInteractor::Result
readonly
An instance of Result for the interactor that failed.
Instance Method Summary collapse
-
#initialize(result, message = nil) ⇒ ActiveInteractor::Error
constructor
Create a new instance of Error.
Constructor Details
#initialize(result, message = nil) ⇒ ActiveInteractor::Error
Create a new instance of ActiveInteractor::Error
20 21 22 23 |
# File 'lib/active_interactor/errors.rb', line 20 def initialize(result, = nil) @result = result super() end |
Instance Attribute Details
#result ⇒ ActiveInteractor::Result (readonly)
Returns An instance of Result for the interactor that failed.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/active_interactor/errors.rb', line 9 class Error < StandardError attr_reader :result # Create a new instance of {ActiveInteractor::Error} # # @param result [ActiveInteractor::Result] An instance of {ActiveInteractor::Result} for the # {ActiveInteractor::Interactor::Base interactor} that failed # @param message [String] The error message # # @private # @return [ActiveInteractor::Error] def initialize(result, = nil) @result = result super() end end |