Exception: ConvenientService::Common::Plugins::CanHaveUserProvidedEntity::Exceptions::ProtoEntityHasNoName Private

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/common/plugins/can_have_user_provided_entity/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(proto_entity:) ⇒ 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



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/convenient_service/common/plugins/can_have_user_provided_entity/exceptions.rb', line 14

def initialize_with_kwargs(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

  initialize(message)
end