Exception: PgEventstore::NotPersistedEventError

Inherits:
Error
  • Object
show all
Defined in:
lib/pg_eventstore/errors.rb,
sig/pg_eventstore/errors.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#as_json, #to_h

Constructor Details

#initialize(event) ⇒ NotPersistedEventError

@param event

Parameters:



322
323
324
325
# File 'lib/pg_eventstore/errors.rb', line 322

def initialize(event)
  @event = event
  super(user_friendly_message)
end

Instance Attribute Details

#eventPgEventstore::Event

Returns the value of attribute event.

Returns:



319
320
321
# File 'lib/pg_eventstore/errors.rb', line 319

def event
  @event
end

Instance Method Details

#user_friendly_messageString

Returns:

  • (String)


328
329
330
# File 'lib/pg_eventstore/errors.rb', line 328

def user_friendly_message
  "Event #{event.inspect} is not persisted a persisted event."
end