Exception: ActiveInteractor::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_interactor/errors.rb

Overview

Raised on interactor failure

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, message = nil) ⇒ Error

Returns a new instance of Error.



11
12
13
14
# File 'lib/active_interactor/errors.rb', line 11

def initialize(result, message = nil)
  @result = result
  super(message)
end

Instance Attribute Details

#resultActiveInteractor::Result (readonly)

Returns the result of the interactor that failed.

Returns:



8
9
10
11
12
13
14
15
# File 'lib/active_interactor/errors.rb', line 8

class Error < StandardError
  attr_reader :result

  def initialize(result, message = nil)
    @result = result
    super(message)
  end
end