Class: Shipeasy::SDK::See::ControlFlowChain

Inherits:
Object
  • Object
show all
Defined in:
lib/shipeasy/sdk/see.rb

Overview

‘control_flow_exception(e).because(“because …”)` — marks the exception expected and reports NOTHING. `.extras` is stored for local debugging only (an expected exception is never transmitted).

Instance Method Summary collapse

Constructor Details

#initialize(err) ⇒ ControlFlowChain

Returns a new instance of ControlFlowChain.



245
246
247
# File 'lib/shipeasy/sdk/see.rb', line 245

def initialize(err)
  @err = err
end

Instance Method Details

#because(reason) ⇒ Object



249
250
251
252
# File 'lib/shipeasy/sdk/see.rb', line 249

def because(reason)
  See.mark_expected(@err, reason)
  ControlFlowTail.new(@err, reason)
end