Exception: GPGME::Error

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

Defined Under Namespace

Classes: AmbiguousName, BadCertificateChain, BadPassphrase, BadSignature, Canceled, CertificateExpired, CertificateRevoked, Conflict, DecryptFailed, General, InvalidEngine, InvalidValue, MissingCertificate, NoCRLKnown, NoData, NoPolicyMatch, NoPublicKey, NoSecretKey, NotImplemented, UnsupportedAlgorithm, UnusablePublicKey, UnusableSecretKey, WrongKeyUsage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ Error

Returns a new instance of Error.



588
589
590
# File 'lib/gpgme.rb', line 588

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



591
592
593
# File 'lib/gpgme.rb', line 591

def error
  @error
end

Instance Method Details

#codeObject

Return the error code.

The error code indicates the type of an error, or the reason why an operation failed.



597
598
599
# File 'lib/gpgme.rb', line 597

def code
  GPGME::gpgme_err_code(@error)
end

#messageObject

Return a description of the error code.



614
615
616
# File 'lib/gpgme.rb', line 614

def message
  GPGME::gpgme_strerror(@error)
end

#sourceObject

Return the error source.

The error source has not a precisely defined meaning. Sometimes it is the place where the error happened, sometimes it is the place where an error was encoded into an error value. Usually the error source will give an indication to where to look for the problem. This is not always true, but it is attempted to achieve this goal.



609
610
611
# File 'lib/gpgme.rb', line 609

def source
  GPGME::gpgme_err_source(@error)
end