doc,cpp: Treat GPG_ERR_FULLY_CANCELED as canceled
* doc/gpgme.texi (GPG_ERR_FULLY_CANCELED): New. * lang/cpp/src/context.cpp (Error::isCanceled): Also return true for GPG_ERR_FULLY_CANCELED. -- For internal purposes, GnuPG sometimes uses the error code GPG_ERR_FULLY_CANCELED instead of GPG_ERR_CANCELED. From a user perspective both values mean the same thing and should therefore be treated identically. GnuPG-bug-id: 6510
This commit is contained in:
parent
e2103be390
commit
7990f70107
3
NEWS
3
NEWS
@ -1,6 +1,9 @@
|
|||||||
Noteworthy changes in version 1.21.0 (unreleased)
|
Noteworthy changes in version 1.21.0 (unreleased)
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
|
* Error::isCanceled now also returns true for error code
|
||||||
|
GPG_ERR_FULLY_CANCELED. [T6510]
|
||||||
|
|
||||||
|
|
||||||
Noteworthy changes in version 1.20.0 (2023-04-20)
|
Noteworthy changes in version 1.20.0 (2023-04-20)
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
@ -1649,6 +1649,11 @@ when requested.
|
|||||||
@item GPG_ERR_CANCELED
|
@item GPG_ERR_CANCELED
|
||||||
This value means that the operation was canceled.
|
This value means that the operation was canceled.
|
||||||
|
|
||||||
|
@item GPG_ERR_FULLY_CANCELED
|
||||||
|
This value means that the operation was canceled. It is sometimes returned
|
||||||
|
instead of @code{GPG_ERR_CANCELED} for internal reasons in GnuPG. You should
|
||||||
|
treat both values identically.
|
||||||
|
|
||||||
@item GPG_ERR_INV_ENGINE
|
@item GPG_ERR_INV_ENGINE
|
||||||
This value means that the engine that implements the desired protocol
|
This value means that the engine that implements the desired protocol
|
||||||
is currently not available. This can either be because the sources
|
is currently not available. This can either be because the sources
|
||||||
|
@ -142,7 +142,7 @@ int Error::sourceID() const
|
|||||||
|
|
||||||
bool Error::isCanceled() const
|
bool Error::isCanceled() const
|
||||||
{
|
{
|
||||||
return code() == GPG_ERR_CANCELED;
|
return code() == GPG_ERR_CANCELED || code() == GPG_ERR_FULLY_CANCELED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Error::toErrno() const
|
int Error::toErrno() const
|
||||||
|
Loading…
Reference in New Issue
Block a user