tdf#42982: Improve UNO error reporting. Make exceptions more descriptive

Change-Id: Idb292c508029efeb23ed969c9fad566154cb424c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162354
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
diff --git a/xmlsecurity/source/xmlsec/xmlsec_init.cxx b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
index 410408e..be5c8bf 100644
--- a/xmlsecurity/source/xmlsec/xmlsec_init.cxx
+++ b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
@@ -28,20 +28,20 @@ XSECXMLSEC_DLLPUBLIC void initXmlSec()
{
    //Init xmlsec library
    if( xmlSecInit() < 0 ) {
        throw RuntimeException() ;
        throw RuntimeException("Failed to initialize XML Security (xmlsec) library") ;
    }

    //Init xmlsec crypto engine library
#ifdef XMLSEC_CRYPTO_MSCRYPTO
    if( xmlSecMSCngInit() < 0 ) {
        xmlSecShutdown();
        throw RuntimeException();
        throw RuntimeException("Failed to initialize XML Security (xmlsec) for Microsoft crypto engine library");
    }
#endif
#ifdef XMLSEC_CRYPTO_NSS
    if( xmlSecNssInit() < 0 ) {
        xmlSecShutdown();
        throw RuntimeException();
        throw RuntimeException("Failed to Initialize XML Security (xmlsec) NSS crypto engine library");
    }
#endif

@@ -54,7 +54,7 @@ XSECXMLSEC_DLLPUBLIC void initXmlSec()
        xmlSecNssShutdown();
#endif
        xmlSecShutdown() ;
        throw RuntimeException() ;
        throw RuntimeException("Failed to Initialize XML Security (xmlsec) NSS crypto engine library") ;
    }
}