From db532eca8ebd64536985e7a40af22e803e3b3df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Mon, 4 Apr 2022 13:15:37 +0200 Subject: cpp: Return actual error if revocation fails * lang/cpp/src/editinteractor.cpp, lang/cpp/src/editinteractor.h (EditInteractor::parseStatusError): New. * lang/cpp/src/gpgrevokekeyeditinteractor.cpp (GpgRevokeKeyEditInteractor::Private::nextState): Handle status error. -- With this change the interactor returns a proper error like "Bad Passphrase" or "Empty Passphrase" instead of an unspecific "General Error" if a status error occurred. GnuPG-bug-id: 5904 --- lang/cpp/src/editinteractor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lang/cpp/src/editinteractor.h') diff --git a/lang/cpp/src/editinteractor.h b/lang/cpp/src/editinteractor.h index 247bf8c0..2505b028 100644 --- a/lang/cpp/src/editinteractor.h +++ b/lang/cpp/src/editinteractor.h @@ -60,6 +60,9 @@ public: void setDebugChannel(std::FILE *file); +protected: + Error parseStatusError(const char *args); + private: class Private; Private *const d; -- cgit v1.2.3