Exception: ConvenientService::Common::Plugins::HasAroundCallbacks::Exceptions::AroundCallbackChainIsNotContinued

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/common/plugins/has_around_callbacks/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(callback:) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/convenient_service/common/plugins/has_around_callbacks/exceptions.rb', line 9

def initialize_with_kwargs(callback:)
  message = <<~TEXT
    Around callback chain is NOT continued from `#{callback.block.source_location}`.

    Did you forget to call `chain.yield`? For example:

    around :result do |chain|
      # ...
      chain.yield
      # ...
    end
  TEXT

  initialize(message)
end