Exception: Esse::Events::UnregisteredEventError

Inherits:
Esse::Error
  • Object
show all
Defined in:
lib/esse/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(object_or_event_id) ⇒ UnregisteredEventError

Returns a new instance of UnregisteredEventError.



69
70
71
72
73
74
75
76
# File 'lib/esse/errors.rb', line 69

def initialize(object_or_event_id)
  case object_or_event_id
  when String, Symbol
    super("You are trying to publish an unregistered event: `#{object_or_event_id}`")
  else
    super('You are trying to publish an unregistered event')
  end
end