Exception: Kotoshu::SpellcheckError

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

Overview

Error raised during spell checking operations.

Examples:

Spell check failure

raise SpellcheckError, "Failed to check word: encoding error"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, word: nil) ⇒ SpellcheckError

Create a new spellcheck error.

Parameters:

  • message (String)

    The error message

  • word (String) (defaults to: nil)

    The word being checked (optional)



77
78
79
80
# File 'lib/kotoshu/core/exceptions.rb', line 77

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

Instance Attribute Details

#wordString? (readonly)

Returns The word being checked.

Returns:

  • (String, nil)

    The word being checked



83
84
85
# File 'lib/kotoshu/core/exceptions.rb', line 83

def word
  @word
end