class GPGME::Error

Attributes

error[R]

Public Class Methods

new(error) click to toggle source
# File lib/gpgme/error.rb, line 3
def initialize(error)
  @error = error
end

Public Instance Methods

code() click to toggle source

Return the error code.

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

# File lib/gpgme/error.rb, line 12
def code
  GPGME::gpgme_err_code(@error)
end
message() click to toggle source

Return a description of the error code.

# File lib/gpgme/error.rb, line 29
def message
  GPGME::gpgme_strerror(@error)
end
source() click to toggle source

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.

# File lib/gpgme/error.rb, line 24
def source
  GPGME::gpgme_err_source(@error)
end