Class: Confium::VerificationError

Inherits:
Error
  • Object
show all
Defined in:
lib/confium/errors/verification_error.rb

Overview

Raised when a signature / hash / proof fails to verify.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, details_hash = nil, **kwargs) ⇒ VerificationError

Returns a new instance of VerificationError.



7
8
9
10
11
12
# File 'lib/confium/errors/verification_error.rb', line 7

def initialize(message = nil, details_hash = nil, **kwargs)
  message, kwargs = Confium::Errors::Coerce.args(message, details_hash, kwargs)
  @signer_index = kwargs.delete(:signer_index)
  @algorithm = kwargs.delete(:algorithm)
  super(message, details: { signer_index: @signer_index, algorithm: @algorithm, **kwargs })
end

Instance Attribute Details

#algorithmObject (readonly)

Returns the value of attribute algorithm.



5
6
7
# File 'lib/confium/errors/verification_error.rb', line 5

def algorithm
  @algorithm
end

#signer_indexObject (readonly)

Returns the value of attribute signer_index.



5
6
7
# File 'lib/confium/errors/verification_error.rb', line 5

def signer_index
  @signer_index
end