Exception: Age::GenerateKeyPairError

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

Overview

Custom error class for generate key pair errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason = nil) ⇒ GenerateKeyPairError

Returns a new instance of GenerateKeyPairError.



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

def initialize(reason = nil)
  @reason = reason
  super('Generation key pair failed.')
end

Instance Attribute Details

#reasonString? (readonly)

Returns reason for the key pair generation error.

Returns:

  • (String, nil)

    reason for the key pair generation error



35
36
37
# File 'lib/age/errors.rb', line 35

def reason
  @reason
end