Exception: Easyop::Ctx::Failure
- Inherits:
-
StandardError
- Object
- StandardError
- Easyop::Ctx::Failure
- 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
-
#ctx ⇒ Object
readonly
Returns the value of attribute ctx.
Instance Method Summary collapse
-
#initialize(ctx) ⇒ Failure
constructor
A new instance of Failure.
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
#ctx ⇒ Object (readonly)
Returns the value of attribute ctx.
25 26 27 |
# File 'lib/easyop/ctx.rb', line 25 def ctx @ctx end |