diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-16 15:37:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-17 08:18:51 +0200 |
commit | f41a55474cb6217560af81ae99c3e2fe1aca5215 (patch) | |
tree | 703ddebaa16e967ff0529b0bfe8667661a6abae7 /sdext | |
parent | c77a1e1c039c863e6fdb47b92ce315b87fc73d0d (diff) |
loplugin:logexceptionnicely in scripting..sdext
Change-Id: Ib08f41bb0bed494e7ed00f5bae92eae2b8e80d93
Reviewed-on: https://gerrit.libreoffice.org/74113
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/filterdet.cxx | 5 | ||||
-rw-r--r-- | sdext/source/pdfimport/pdfiadaptor.cxx | 5 | ||||
-rw-r--r-- | sdext/source/pdfimport/test/pdf2xml.cxx | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index a726ef883e3c..4b72c932f44c 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -36,6 +36,7 @@ #include <comphelper/fileurl.hxx> #include <comphelper/hash.hxx> #include <cppuhelper/supportsservice.hxx> +#include <tools/diagnose_ex.h> #include <memory> #include <string.h> @@ -290,8 +291,8 @@ OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& rF } osl_closeFile( aFile ); } - } catch (css::io::IOException & e) { - SAL_WARN("sdext.pdfimport", "caught " << e); + } catch (const css::io::IOException &) { + TOOLS_WARN_EXCEPTION("sdext.pdfimport", "caught"); return OUString(); } OUString aEmbedMimetype; diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index cd8c67b24ab1..e66cf59f7f79 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -39,6 +39,7 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <com/sun/star/io/XSeekable.hpp> +#include <tools/diagnose_ex.h> #include <memory> @@ -153,9 +154,9 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert m_xContext ), uno::UNO_QUERY ); } - catch(const uno::Exception& e) + catch(const uno::Exception&) { - SAL_INFO("sdext.pdfimport", "subfilter: " << e); + TOOLS_INFO_EXCEPTION("sdext.pdfimport", "subfilter"); } SAL_INFO("sdext.pdfimport", "subfilter: " << xSubFilter.get() ); diff --git a/sdext/source/pdfimport/test/pdf2xml.cxx b/sdext/source/pdfimport/test/pdf2xml.cxx index 5d8c06ca0294..04b5ee8d19c0 100644 --- a/sdext/source/pdfimport/test/pdf2xml.cxx +++ b/sdext/source/pdfimport/test/pdf2xml.cxx @@ -32,6 +32,7 @@ #include <unotest/bootstrapfixturebase.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/bootstrap.hxx> +#include <tools/diagnose_ex.h> using namespace ::pdfi; using namespace ::com::sun::star; @@ -80,9 +81,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) xAdaptor->setTreeVisitorFactory(pTreeFactory); nRet = xAdaptor->odfConvert(aSrcURL, new OutputWrap(aDstURL), nullptr) ? 0 : 1; } - catch (const uno::Exception& e) + catch (const uno::Exception&) { - SAL_WARN("vcl.app", "Fatal: " << e); + TOOLS_WARN_EXCEPTION("vcl.app", "Fatal"); return 1; } catch (const std::exception& e) |