cpp: Allow changing the error of a result
* lang/cpp/src/result.h (class Result): Add member function setError. -- This can be used to replace the error of a result with a more suitable error. GnuPG-bug-id: 5939
This commit is contained in:
parent
b10791b055
commit
321c8a0254
1
NEWS
1
NEWS
@ -11,6 +11,7 @@ Noteworthy changes in version 1.17.2 (unreleased)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
cpp: RevocationReason NEW.
|
||||
cpp: GpgRevokeKeyEditInteractor NEW.
|
||||
cpp: Result::setError NEW.
|
||||
qt: RevokeKeyJob NEW.
|
||||
qt: Protocol::revokeKeyJob NEW.
|
||||
|
||||
|
@ -50,6 +50,14 @@ public:
|
||||
{
|
||||
return mError;
|
||||
}
|
||||
/**
|
||||
* Replaces the error set during construction with \p error.
|
||||
* Use with care, e.g. to set a more suitable error.
|
||||
*/
|
||||
void setError(const Error &error)
|
||||
{
|
||||
mError = error;
|
||||
}
|
||||
|
||||
protected:
|
||||
Error mError;
|
||||
|
Loading…
Reference in New Issue
Block a user