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.



294
295
296
# File 'lib/shipeasy/sdk/see.rb', line 294

def initialize(err)
  @err = err
end

Instance Method Details

#because(reason) ⇒ Object



298
299
300
301
# File 'lib/shipeasy/sdk/see.rb', line 298

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