summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-18 09:33:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-18 10:31:43 +0200
commit70accc2904edb5c4aa9b5acb7ff2889a77717b75 (patch)
treef6b8aa6e318694b8fe81b40abcf115e4fe54230f /unoxml
parentb8775ff8961dbe589799ac7f59427a8e5d07ac72 (diff)
loplugin:logexceptionnicely in toolkit..unoxml
Change-Id: I0a3126545f9ef98640f6dd166290e9b9e91b8355 Reviewed-on: https://gerrit.libreoffice.org/74244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/Library_unoxml.mk1
-rw-r--r--unoxml/source/dom/documentbuilder.cxx17
-rw-r--r--unoxml/source/dom/elementlist.cxx5
3 files changed, 13 insertions, 10 deletions
diff --git a/unoxml/Library_unoxml.mk b/unoxml/Library_unoxml.mk
index 335bf10e9b38..f6e5e5d7832f 100644
--- a/unoxml/Library_unoxml.mk
+++ b/unoxml/Library_unoxml.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Library_use_libraries,unoxml,\
cppuhelper \
cppu \
sal \
+ tl \
xo \
))
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index bbb412a32df0..5f08a7bc3236 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -32,6 +32,7 @@
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase.hxx>
@@ -200,8 +201,8 @@ namespace DOM
// copy bytes to the provided buffer
memcpy(buffer, chunk.getConstArray(), nread);
return nread;
- } catch (const css::uno::Exception& ex) {
- SAL_WARN( "unoxml", ex);
+ } catch (const css::uno::Exception&) {
+ TOOLS_WARN_EXCEPTION( "unoxml", "");
return -1;
}
}
@@ -219,8 +220,8 @@ namespace DOM
if (pctx->freeOnClose)
delete pctx;
return 0;
- } catch (const css::uno::Exception& ex) {
- SAL_WARN( "unoxml", ex);
+ } catch (const css::uno::Exception&) {
+ TOOLS_WARN_EXCEPTION( "unoxml", "");
return -1;
}
}
@@ -293,10 +294,10 @@ namespace DOM
pDocBuilder->getErrorHandler()->warning(::css::uno::Any(saxex));
}
}
- catch (const css::uno::Exception &e)
+ catch (const css::uno::Exception &)
{
// Protect lib2xml from UNO Exception
- SAL_WARN("unoxml", "DOM::warning_func: caught " << e);
+ TOOLS_WARN_EXCEPTION("unoxml", "DOM::warning_func");
}
}
@@ -325,10 +326,10 @@ namespace DOM
pDocBuilder->getErrorHandler()->error(::css::uno::Any(saxex));
}
}
- catch (const css::uno::Exception &e)
+ catch (const css::uno::Exception &)
{
// Protect lib2xml from UNO Exception
- SAL_WARN("unoxml", "DOM::error_func: caught " << e);
+ TOOLS_WARN_EXCEPTION("unoxml", "DOM::error_func");
}
}
} // extern "C"
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index 6d47e55c023d..11afe2a14a16 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -24,6 +24,7 @@
#include <cppuhelper/implbase.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include "element.hxx"
#include "document.hxx"
@@ -107,8 +108,8 @@ namespace DOM
static_cast<XElement*>(& rElement), UNO_QUERY_THROW);
m_xEventListener = new WeakEventListener(this);
xTarget->addEventListener("DOMSubtreeModified", m_xEventListener, false/*capture*/);
- } catch (const Exception &e){
- SAL_WARN( "unoxml", "Exception caught while registering NodeList as listener: " << e);
+ } catch (const Exception &){
+ TOOLS_WARN_EXCEPTION( "unoxml", "Exception caught while registering NodeList as listener");
}
}