Next: , Previous: , Up: Error Handling   [Contents][Index]

5.2 Error Sources

The library libgpg-error defines an error source for every component of the GnuPG system. The error source part of an error value is not well defined. As such it is mainly useful to improve the diagnostic error message for the user.

If the error code part of an error value is 0, the whole error value will be 0. In this case the error source part is of course GPG_ERR_SOURCE_UNKNOWN.

The list of error sources that might occur in applications using GPGME is:


The error source is not known. The value of this error source is 0.


The error source is GPGME itself. This is the default for errors that occur in the GPGME library.


The error source is GnuPG, which is the crypto engine used for the OpenPGP protocol.


The error source is GPGSM, which is the crypto engine used for the CMS protocol.


The error source is libgcrypt, which is used by crypto engines to perform cryptographic operations.


The error source is gpg-agent, which is used by crypto engines to perform operations with the secret key.


The error source is pinentry, which is used by gpg-agent to query the passphrase to unlock a secret key.


The error source is the SmartCard Daemon, which is used by gpg-agent to delegate operations with the secret key to a SmartCard.


The error source is libkbx, a library used by the crypto engines to manage local keyrings.


These error sources are not used by any GnuPG component and can be used by other software. For example, applications using GPGME can use them to mark error values coming from callback handlers. Thus GPG_ERR_SOURCE_USER_1 is the default for errors created with gpgme_error and gpgme_error_from_errno, unless you define GPGME_ERR_SOURCE_DEFAULT before including gpgme.h.

Next: Error Codes, Previous: Error Values, Up: Error Handling   [Contents][Index]