Exception: Age::EncryptionError

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

Overview

Custom error class for encryption errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason = nil) ⇒ EncryptionError

Returns a new instance of EncryptionError.



11
12
13
14
# File 'lib/age/errors.rb', line 11

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

Instance Attribute Details

#reasonString? (readonly)

Returns reason for the encryption error.

Returns:

  • (String, nil)

    reason for the encryption error



9
10
11
# File 'lib/age/errors.rb', line 9

def reason
  @reason
end