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.



319
320
321
# File 'lib/shipeasy/sdk/see.rb', line 319

def initialize(err)
  @err = err
end

Instance Method Details

#because(reason) ⇒ Object



323
324
325
326
# File 'lib/shipeasy/sdk/see.rb', line 323

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