Exception: Dry::Effects::Errors::UnhandledEffectError Private

Inherits:
RuntimeError
  • Object
show all
Includes:
Error
Defined in:
lib/dry/effects/errors.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

No handler in the stack

Direct Known Subclasses

MissingStateError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(effect, message = Undefined) ⇒ UnhandledEffectError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of UnhandledEffectError.



17
18
19
20
21
22
23
24
25
26
# File 'lib/dry/effects/errors.rb', line 17

def initialize(effect, message = Undefined)
  @effect = effect

  super(
    Undefined.default(message) {
      "Effect #{effect.inspect} not handled. " \
        "Effects must be wrapped with corresponding handlers"
    }
  )
end

Instance Attribute Details

#effectObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
# File 'lib/dry/effects/errors.rb', line 15

def effect
  @effect
end