Next: Error Codes, Previous: Error Values, Up: Error Handling
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:
GPG_ERR_SOURCE_UNKNOWN
0
.
GPG_ERR_SOURCE_GPGME
GPG_ERR_SOURCE_GPG
GPG_ERR_SOURCE_GPGSM
GPG_ERR_SOURCE_GCRYPT
libgcrypt
, which is used by crypto engines
to perform cryptographic operations.
GPG_ERR_SOURCE_GPGAGENT
GPG_ERR_SOURCE_PINENTRY
GPG_ERR_SOURCE_SCD
GPG_ERR_SOURCE_KEYBOX
libkbx
, a library used by the crypto
engines to manage local keyrings.
GPG_ERR_SOURCE_USER_1
GPG_ERR_SOURCE_USER_2
GPG_ERR_SOURCE_USER_3
GPG_ERR_SOURCE_USER_4
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.