summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-18 15:38:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-18 20:03:42 +0200
commit2836b78b54650d117282a9a345677d1b4d9fc043 (patch)
tree7627772f88f8d6f1b56f4f4db2675ae8772638f6 /xmlsecurity
parent697f8edbb0154ed72a42e4e8d7c4942cfe7dd59d (diff)
loplugin:logexceptionnicely in xmlhelp..xmlsecurity
Change-Id: Idbf0de3f953b08f98144241346533ad30f49269e Reviewed-on: https://gerrit.libreoffice.org/74285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx5
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx5
-rw-r--r--xmlsecurity/workben/pdfverify.cxx13
3 files changed, 13 insertions, 10 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 66a058c1d3dd..37faa606c32f 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -39,6 +39,7 @@
#include <rtl/uri.hxx>
#include <sal/log.hxx>
#include <svx/xoutbmp.hxx>
+#include <tools/diagnose_ex.h>
#include <xmloff/attrlist.hxx>
#include <xsecctl.hxx>
@@ -379,9 +380,9 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream(
aHelper.xSignatureStorage = rxStore->openStorageElement("_xmlsignatures", nSubStorageOpenMode);
aHelper.nStorageFormat = embed::StorageFormats::OFOPXML;
}
- catch (const io::IOException& rException)
+ catch (const io::IOException&)
{
- SAL_WARN_IF(nOpenMode != css::embed::ElementModes::READ, "xmlsecurity.helper", "DocumentSignatureHelper::OpenSignatureStream: " << rException);
+ TOOLS_WARN_EXCEPTION_IF(nOpenMode != css::embed::ElementModes::READ, "xmlsecurity.helper", "DocumentSignatureHelper::OpenSignatureStream:");
}
}
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index d77e2d4a4fcb..4813d9cac10c 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -31,6 +31,7 @@
#include <osl/file.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/tempfile.hxx>
#include <salhelper/singletonref.hxx>
@@ -260,9 +261,9 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen
return OUStringToOString(sUserSetCertPath, osl_getThreadTextEncoding());
}
}
- catch (const uno::Exception &e)
+ catch (const uno::Exception &)
{
- SAL_WARN("xmlsecurity.xmlsec", "getMozillaCurrentProfile: caught " << e);
+ TOOLS_WARN_EXCEPTION("xmlsecurity.xmlsec", "getMozillaCurrentProfile:");
}
// third, dig around to see if there's one available
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx
index efe0461b9f14..191ca8c087eb 100644
--- a/xmlsecurity/workben/pdfverify.cxx
+++ b/xmlsecurity/workben/pdfverify.cxx
@@ -18,6 +18,7 @@
#include <osl/file.hxx>
#include <sal/log.hxx>
#include <sal/main.h>
+#include <tools/diagnose_ex.h>
#include <vcl/pngwrite.hxx>
#include <vcl/svapp.hxx>
#include <vcl/graphicfilter.hxx>
@@ -67,10 +68,10 @@ int pdfVerify(int nArgc, char** pArgv)
{
xComponentContext = cppu::defaultBootstrap_InitialComponentContext();
}
- catch (const uno::RuntimeException& rException)
+ catch (const uno::RuntimeException&)
{
- SAL_WARN("xmlsecurity.pdfio",
- "cppu::defaultBootstrap_InitialComponentContext() failed: " << rException);
+ TOOLS_WARN_EXCEPTION("xmlsecurity.pdfio",
+ "cppu::defaultBootstrap_InitialComponentContext() failed:");
return 1;
}
uno::Reference<lang::XMultiComponentFactory> xMultiComponentFactory
@@ -92,10 +93,10 @@ int pdfVerify(int nArgc, char** pArgv)
{
xSEInitializer = xml::crypto::SEInitializer::create(xComponentContext);
}
- catch (const uno::DeploymentException& rException)
+ catch (const uno::DeploymentException&)
{
- SAL_WARN("xmlsecurity.pdfio",
- "DeploymentException while creating SEInitializer: " << rException);
+ TOOLS_WARN_EXCEPTION("xmlsecurity.pdfio",
+ "DeploymentException while creating SEInitializer:");
return 1;
}
uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext