Sha256: aa92b1b2b13f6d3ec25a7cab9a896d6115a7ae89d5d31969ace2f433f7c364c5

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module CanHaveSteps
        module Entities
          class Step
            module Exceptions
              class StepHasNoOrganizer < ::ConvenientService::Exception
                def initialize_with_kwargs(step:)
                  message = <<~TEXT
                    Step `#{step.printable_service}` has not assigned organizer.

                    Did you forget to set it?
                  TEXT

                  initialize(message)
                end
              end

              class StepResultDataNotExistingAttribute < ::ConvenientService::Exception
                ##
                # @param key [Symbol]
                # @param step [ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step]
                # @return [void]
                #
                def initialize_with_kwargs(key:, step:)
                  message = <<~TEXT
                    Step `#{step.printable_service}` result does NOT return `:#{key}` data attribute.

                    Maybe there is a typo in `out` definition?

                    Or `success` of `#{step.printable_service}` accepts a wrong key?
                  TEXT

                  initialize(message)
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/exceptions.rb