diff options
author | Andras Timar <andras.timar@collabora.com> | 2022-11-04 17:44:10 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-01-16 17:31:25 +0100 |
commit | a53581f09b7df2b9e639318d10dd5a0aec7eb600 (patch) | |
tree | 3a158b2a6325f6828d43a926b202d486c28c44d8 /comphelper | |
parent | 8c23a0ca44ef86c4bcfd62033a63fb2715f68ef9 (diff) |
more detailed NSS error report
Change-Id: I1b005a331aeed1c00d6bf18a6dff0ffa844ba6f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142286
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/hash.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index 50fd8cd0f961..9fab6028a659 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -18,6 +18,7 @@ #if USE_TLS_NSS #include <nss.h> +#include <nspr.h> #include <sechash.h> #elif USE_TLS_OPENSSL #include <openssl/evp.h> @@ -78,7 +79,9 @@ struct HashImpl #if USE_TLS_NSS auto const e = NSS_NoDB_Init(nullptr); if (e != SECSuccess) { - throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString::number(e)); + PRErrorCode error = PR_GetError(); + const char* errorText = PR_ErrorToName(error); + throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString(errorText, strlen(errorText), RTL_TEXTENCODING_UTF8) + " (" + OUString::number((int) error) + ")"); } mpContext = HASH_Create(getNSSType()); HASH_Begin(mpContext); |