Sha256: 50b64ef3923ef7f61c07d8d57457ab9d5f68cb40945deabb11d6a8ab5ecf3d91

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Common
    module Plugins
      module CanHaveUserProvidedEntity
        module Errors
          class ProtoEntityHasNoName < ::ConvenientService::Error
            def initialize(proto_entity:)
              message = <<~TEXT
                Proto entity `#{proto_entity}` has no name.

                In other words:

                  proto_entity.name
                  # => nil

                NOTE: Anonymous classes do NOT have names. Are you passing an anonymous class?
              TEXT

              super(message)
            end
          end

          class ProtoEntityHasNoConcern < ::ConvenientService::Error
            def initialize(proto_entity:)
              message = <<~TEXT
                Proto entity `#{proto_entity}` has no concern.

                Have a look at `ConvenientService::Service::Plugins::HasResult::Entities::Result`.

                It is an example of a valid proto entity.
              TEXT

              super(message)
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/common/plugins/can_have_user_provided_entity/errors.rb