summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-15 13:11:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-16 08:55:07 +0200
commit7508c1d1e701dba8cb67414be59193d9672b66ab (patch)
tree5f37eecd6486a223f26b882ca8697fb9afecb9cc /filter
parentcf4059d59752de6e9a6eca59b388beef27bcd7e6 (diff)
loplugin:logexceptionnicely in filter..framework
Change-Id: I8cf70ee278c641767e3fcfcfd151d99d791b3468 Reviewed-on: https://gerrit.libreoffice.org/74098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/config/cache/filtercache.cxx5
-rw-r--r--filter/source/config/cache/typedetection.cxx6
-rw-r--r--filter/source/msfilter/eschesdo.cxx5
-rw-r--r--filter/source/pdf/impdialog.cxx5
-rw-r--r--filter/source/svg/svgfilter.cxx5
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx10
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx6
7 files changed, 21 insertions, 21 deletions
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index a1ae51b1f04c..251695ca738a 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -19,6 +19,7 @@
#include <memory>
+#include <tools/diagnose_ex.h>
#include "filtercache.hxx"
#include "constant.hxx"
#include "cacheupdatelistener.hxx"
@@ -860,9 +861,9 @@ css::uno::Any FilterCache::impl_getDirectCFGValue(const OUString& sDirectKey)
}
catch(const css::uno::RuntimeException&)
{ throw; }
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN( "filter.config", ex);
+ TOOLS_WARN_EXCEPTION( "filter.config", "");
aValue.clear();
}
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 60b68f4592c6..06aa7ae565f4 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -32,6 +32,7 @@
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <framework/interaction.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <comphelper/fileurl.hxx>
#include <comphelper/processfactory.hxx>
@@ -448,10 +449,9 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
{
throw;
}
- catch(const css::uno::Exception& e)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("filter.config", "caught " << e
- << " while querying type of " << sURL);
+ TOOLS_WARN_EXCEPTION("filter.config", "caught exception while querying type of " << sURL);
sType.clear();
}
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 9ed77a8b2280..365a620f5a4c 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -30,6 +30,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/graph.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <svx/fmdpage.hxx>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/awt/Gradient.hpp>
@@ -1219,9 +1220,9 @@ sal_uInt32 ImplEESdrObject::ImplGetText()
{
mnTextSize = xXText->getString().getLength();
}
- catch (const uno::RuntimeException& e)
+ catch (const uno::RuntimeException&)
{
- SAL_WARN("filter.ms", "ImplGetText: " << e);
+ TOOLS_WARN_EXCEPTION("filter.ms", "ImplGetText");
}
}
return mnTextSize;
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 52e22cf01a28..0eccc2da71ff 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -30,6 +30,7 @@
#include <svtools/miscopt.hxx>
#include <unotools/resmgr.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
@@ -1501,9 +1502,9 @@ IMPL_LINK_NOARG(ImpPDFTabSigningPage, ClickmaPbSignCertSelect, weld::Button&, vo
}
}
}
- catch (const uno::Exception &e)
+ catch (const uno::Exception &)
{
- SAL_INFO("filter.pdf", "TSAURLsDialog::TSAURLsDialog(): " << e);
+ TOOLS_INFO_EXCEPTION("filter.pdf", "TSAURLsDialog::TSAURLsDialog()");
}
// If more than only the "None" entry is there, enable the ListBox
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index 252f13e89173..482c3ba7eb2f 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -50,6 +50,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/zcodec.hxx>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
@@ -822,9 +823,9 @@ OUString SAL_CALL SVGFilter::detect(Sequence<PropertyValue>& rDescriptor)
}
}
}
- catch (css::io::IOException & e)
+ catch (css::io::IOException &)
{
- SAL_WARN("filter.svg", "caught " << e);
+ TOOLS_WARN_EXCEPTION("filter.svg", "");
}
return aRetval;
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 71d202d2eb24..400a9aa66d17 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include "XmlFilterAdaptor.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -183,12 +184,11 @@ bool XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >&
return false;
}
}
- catch( const Exception& e )
+ catch( const Exception& )
{
+ TOOLS_WARN_EXCEPTION("filter.xmlfa", "XmlFilterAdaptor");
if (xStatusIndicator.is())
xStatusIndicator->end();
-
- SAL_WARN("filter.xmlfa", "XmlFilterAdaptor: " << e);
return false;
}
if (xStatusIndicator.is()) {
@@ -297,9 +297,9 @@ bool XmlFilterAdaptor::exportImpl( const Sequence< css::beans::PropertyValue >&
return false;
}
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN("filter.xmlfa", "XmlFilterAdaptor: " << e);
+ TOOLS_WARN_EXCEPTION("filter.xmlfa", "XmlFilterAdaptor");
if (xStatusIndicator.is())
xStatusIndicator->end();
return false;
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index bade0bdbac1a..a3b0940e1bc4 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -234,11 +234,7 @@ namespace XSLT
void
XSLTFilter::error(const Any& a)
{
- Exception e;
- if (a >>= e)
- {
- SAL_WARN("filter.xslt", "XSLTFilter::error was called: " << e);
- }
+ SAL_WARN("filter.xslt", "XSLTFilter::error was called: " << exceptionToString(a));
m_bError = true;
m_cTransformed.set();
}