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.



82
83
84
85
86
87
88
89
# File 'lib/esse/errors.rb', line 82

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