Exception: EventRouter::Errors::UnsupportedOptionError

Inherits:
EventRouter::Error show all
Defined in:
lib/event_router/errors/unsupported_option_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(message: nil, config:, option:, supported_options:) ⇒ UnsupportedOptionError

Returns a new instance of UnsupportedOptionError.



8
9
10
11
12
13
14
# File 'lib/event_router/errors/unsupported_option_error.rb', line 8

def initialize(message: nil, config:, option:, supported_options:)
  @config             = config
  @option             = option
  @supported_options  = supported_options

  super(message || self.message)
end

Instance Method Details

#messageObject



16
17
18
19
# File 'lib/event_router/errors/unsupported_option_error.rb', line 16

def message
  "Unsupported #{@option} for #{@config} configuration. Currently supports #{@supported_options}. " \
    'Please consider registering the adapter before referencing it.'
end