Exception: Crockford32::ChecksumError

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

Overview

An error representing a checksum mismatch between the decoded value and the supplied check symbol.

Since:

  • 1.0.0

Instance Method Summary collapse

Constructor Details

#initialize(value, checksum, checksum_required) ⇒ ChecksumError

Returns a new instance of ChecksumError.

Parameters:

  • value (String)

    the Base32 value to decode.

  • checksum (Integer)

    the checksum of the decoded value.

  • checksum_required (Integer)

    the required checksum of the decoded value.

Since:

  • 1.0.0



56
57
58
# File 'lib/crockford32/errors.rb', line 56

def initialize(value, checksum, checksum_required)
  super("Value #{value} has checksum #{checksum} but requires #{checksum_required}")
end