Exception: Easyop::Ctx::Failure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/easyop/ctx.rb

Overview

Raised (and swallowed by Operation#run) when fail! is called. Propagates to callers of Operation#run! and Operation#call!.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ctx) ⇒ Failure

Returns a new instance of Failure.



27
28
29
30
# File 'lib/easyop/ctx.rb', line 27

def initialize(ctx)
  @ctx = ctx
  super("Operation failed#{": #{ctx.error}" if ctx.error}")
end

Instance Attribute Details

#ctxObject (readonly)

Returns the value of attribute ctx.



25
26
27
# File 'lib/easyop/ctx.rb', line 25

def ctx
  @ctx
end