Exception: Optimizely::InvalidEventError

Inherits:
Error
  • Object
show all
Defined in:
lib/optimizely/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_key) ⇒ InvalidEventError

Returns a new instance of InvalidEventError.

Raises:

  • (ArgumentError)


112
113
114
115
116
117
118
# File 'lib/optimizely/exceptions.rb', line 112

def initialize(event_key)
  raise ArgumentError, 'event_key must be provided.' if event_key.nil?

  super("Event key '#{event_key}' is not in datafile.")

  @event_key = event_key
end

Instance Attribute Details

#event_keyObject (readonly)

Raised when an invalid event key is provided



110
111
112
# File 'lib/optimizely/exceptions.rb', line 110

def event_key
  @event_key
end