Exception: Kotoshu::DictionaryNotFoundError

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

Overview

Error raised when a dictionary file cannot be found.

Examples:

Dictionary not found

raise DictionaryNotFoundError, "Dictionary not found: /path/to/dic.dic"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, message = nil) ⇒ DictionaryNotFoundError

Create a new dictionary not found error.

Parameters:

  • path (String)

    The path that was not found

  • message (String) (defaults to: nil)

    Custom message (optional)



19
20
21
22
# File 'lib/kotoshu/core/exceptions.rb', line 19

def initialize(path, message = nil)
  @path = path
  super(message || "Dictionary not found: #{path}")
end

Instance Attribute Details

#pathString (readonly)

Returns The path that was not found.

Returns:

  • (String)

    The path that was not found



25
26
27
# File 'lib/kotoshu/core/exceptions.rb', line 25

def path
  @path
end