Exception: Interaktor::Failure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/interaktor/failure.rb

Overview

Error raised during interaction failure. The error stores a copy of the failed interaction for debugging purposes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interaction = nil) ⇒ Failure

Returns a new instance of Failure.

Parameters:



9
10
11
12
# File 'lib/interaktor/failure.rb', line 9

def initialize(interaction = nil)
  @interaction = interaction
  super
end

Instance Attribute Details

#interactionInteraktor::Interaction (readonly)

Returns the context of this failure instance.

Returns:



5
6
7
# File 'lib/interaktor/failure.rb', line 5

def interaction
  @interaction
end