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>
This commit is contained in:
seturaj 2024-01-26 13:22:10 -05:00 committed by Ilmari Lauhakangas
parent c67f138ed8
commit b508e4f081

View File

@ -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") ;
}
}