Exception: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::RaisesOnNotResultReturnValue::Exceptions::ReturnValueNotKindOfResult Private

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/exceptions.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.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(step:, result:) ⇒ Object

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.

Since:

  • 1.0.0



18
19
20
21
22
23
24
25
26
27
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/raises_on_not_result_return_value/exceptions.rb', line 18

def initialize_with_kwargs(step:, result:)
  message = <<~TEXT
    Return value of step `#{step.printable_action}` is NOT a `Result`.
    It is `#{result.class}`.

    Did you forget to call `success`, `failure`, or `error`?
  TEXT

  initialize(message)
end