diff options
Diffstat (limited to 'lang/cpp/src/context.cpp')
-rw-r--r-- | lang/cpp/src/context.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index 99e354df..4882c80c 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -130,6 +130,13 @@ const char *Error::asString() const return mMessage.c_str(); } +std::string Error::asStdString() const +{ + std::string message; + format_error(static_cast<gpgme_error_t>(mErr), message); + return message; +} + int Error::code() const { return gpgme_err_code(mErr); |