Exception: BusinessFlow::FlowFailedException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/business_flow/flow_failed_exception.rb

Overview

Exception raised by DSL when flow execution fails

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(flow) ⇒ FlowFailedException

Returns a new instance of FlowFailedException.



8
9
10
11
12
# File 'lib/business_flow/flow_failed_exception.rb', line 8

def initialize(flow)
  errors = flow.errors.full_messages.join(', ')
  super("Failed execution of #{flow.class.name}: #{errors}")
  @flow = flow
end

Instance Attribute Details

#flowObject (readonly)

Returns the value of attribute flow.



6
7
8
# File 'lib/business_flow/flow_failed_exception.rb', line 6

def flow
  @flow
end