Exception: Crockford32::InvalidCharacterError

Inherits:
DecodeError show all
Defined in:
lib/crockford32/errors.rb

Overview

An error representing a decode operation finding an illegal symbol within a provided value.

Since:

  • 1.0.0

Instance Method Summary collapse

Constructor Details

#initialize(string, index) ⇒ InvalidCharacterError

Returns a new instance of InvalidCharacterError.

Parameters:

  • string (String)

    the string to decode.

  • index (Integer)

    the index within the string of the invalid character.

Since:

  • 1.0.0



37
38
39
# File 'lib/crockford32/errors.rb', line 37

def initialize(string, index)
  super("Invalid character '#{string[index]}' in '#{string}' at index #{index}")
end