Exception: Age::DecryptionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/age/errors.rb

Overview

Custom error class for decryption errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason = nil) ⇒ DecryptionError

Returns a new instance of DecryptionError.



24
25
26
27
# File 'lib/age/errors.rb', line 24

def initialize(reason = nil)
  @reason = reason
  super('Decryption failed.')
end

Instance Attribute Details

#reasonString? (readonly)

Returns reason for the decryption error.

Returns:

  • (String, nil)

    reason for the decryption error



22
23
24
# File 'lib/age/errors.rb', line 22

def reason
  @reason
end