Exception: Kotoshu::ConfigurationError

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

Overview

Error raised when there is a configuration issue.

Examples:

Invalid configuration

raise ConfigurationError, "Invalid dictionary type: unknown_type"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, key: nil) ⇒ ConfigurationError

Create a new configuration error.

Parameters:

  • message (String)

    The error message

  • key (String, Symbol) (defaults to: nil)

    The configuration key (optional)



59
60
61
62
# File 'lib/kotoshu/core/exceptions.rb', line 59

def initialize(message, key: nil)
  @key = key
  super(message)
end

Instance Attribute Details

#keyString, ... (readonly)

Returns The configuration key.

Returns:

  • (String, Symbol, nil)

    The configuration key



65
66
67
# File 'lib/kotoshu/core/exceptions.rb', line 65

def key
  @key
end