diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 09:33:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 10:46:40 +0200 |
commit | a2e4b76e29e491bac4f9e6dfd9929dfd49a4b05e (patch) | |
tree | adc41305c2e5dc94631d81f6b027464d1a15358f /vcl/source | |
parent | 70accc2904edb5c4aa9b5acb7ff2889a77717b75 (diff) |
loplugin:logexceptionnicely in vcl
Change-Id: I0ed575a11c84c2e8aabfa1b4204ba6ae27393d5f
Reviewed-on: https://gerrit.libreoffice.org/74245
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/session.cxx | 5 | ||||
-rw-r--r-- | vcl/source/app/svdata.cxx | 5 | ||||
-rw-r--r-- | vcl/source/app/svmain.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/vectorgraphicdata.cxx | 5 | ||||
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 17 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 9 |
7 files changed, 29 insertions, 22 deletions
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index 5679c7a9fb63..c96d179cf90e 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -24,6 +24,7 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> +#include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> #include <factory.hxx> @@ -376,8 +377,8 @@ void VCLSession::disposing() { try { listener.m_xListener->disposing(src); SAL_INFO("vcl.se.debug", " call Listener disposing"); - } catch (css::uno::RuntimeException & e) { - SAL_WARN("vcl.se", "ignoring " << e); + } catch (css::uno::RuntimeException &) { + TOOLS_WARN_EXCEPTION("vcl.se", "ignoring"); } } } diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 93335d48624b..2a3fd1162528 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -22,6 +22,7 @@ #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <rtl/process.h> +#include <tools/diagnose_ex.h> #include <tools/gen.hxx> #include <unotools/resmgr.hxx> #include <uno/current_context.hxx> @@ -244,9 +245,9 @@ vcl::Window *ImplGetDefaultContextWindow() pContext->acquire(); #endif } - catch (const css::uno::Exception& e) + catch (const css::uno::Exception&) { - SAL_WARN("vcl", "unable to create Default Window: " << e); + TOOLS_WARN_EXCEPTION("vcl", "unable to create Default Window"); } } } diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 51e47674b604..64395164e8ba 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -102,6 +102,7 @@ #include <opengl/watchdog.hxx> #include <basegfx/utils/systemdependentdata.hxx> +#include <tools/diagnose_ex.h> #if OSL_DEBUG_LEVEL > 0 #include <typeinfo> @@ -344,9 +345,9 @@ bool InitVCL() osl_setEnvironment(envVar.pData, aLocaleString.pData); } } - catch (const uno::Exception &e) + catch (const uno::Exception &) { - SAL_INFO("vcl.app", "Unable to get ui language: '" << e); + TOOLS_INFO_EXCEPTION("vcl.app", "Unable to get ui language:"); } pSVData->mpDefInst->AfterAppInit(); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index eb730fe578a7..8c01f8302535 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -22,6 +22,7 @@ #include <memory> #include <sal/log.hxx> #include <osl/diagnose.h> +#include <tools/diagnose_ex.h> #include <tools/helpers.hxx> #include <tools/stream.hxx> #include <tools/vcompat.hxx> @@ -426,10 +427,10 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S { throw; // runtime errors are fatal } - catch (const uno::Exception& e) + catch (const uno::Exception&) { // ignore errors, no way of reporting them here - SAL_WARN("vcl.gdi", "GDIMetaFile::ImplPlayWithRenderer: " << e); + TOOLS_WARN_EXCEPTION("vcl.gdi", "GDIMetaFile::ImplPlayWithRenderer"); } return false; diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx index 8c936f00cfd7..3d32af0ee0e7 100644 --- a/vcl/source/gdi/vectorgraphicdata.cxx +++ b/vcl/source/gdi/vectorgraphicdata.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <tools/diagnose_ex.h> #include <tools/stream.hxx> #include <sal/log.hxx> #include <vcl/vectorgraphicdata.hxx> @@ -78,9 +79,9 @@ BitmapEx convertPrimitive2DSequenceToBitmapEx( aRetval = vcl::unotools::bitmapExFromXBitmap(xIntBmp); } } - catch (const uno::Exception& e) + catch (const uno::Exception&) { - SAL_WARN("vcl", "Got no graphic::XPrimitive2DRenderer! : " << e); + TOOLS_WARN_EXCEPTION("vcl", "Got no graphic::XPrimitive2DRenderer!"); } catch (const std::exception& e) { diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index d879759b5486..e1bf651e5b02 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -41,6 +41,7 @@ #include <rtl/bootstrap.hxx> #include <rtl/uri.hxx> +#include <tools/diagnose_ex.h> #include <tools/stream.hxx> #include <tools/urlobj.hxx> #include <implimagetree.hxx> @@ -256,9 +257,9 @@ OUString ImplImageTree::getImageUrl(OUString const & rName, OUString const & rSt } } } - catch (const uno::Exception & e) + catch (const uno::Exception &) { - SAL_INFO("vcl", e); + TOOLS_INFO_EXCEPTION("vcl", ""); } aStyle = fallbackStyle(aStyle); @@ -296,9 +297,9 @@ std::shared_ptr<SvMemoryStream> ImplImageTree::getImageStream(OUString const & r } } } - catch (const uno::Exception & e) + catch (const uno::Exception &) { - SAL_INFO("vcl", e); + TOOLS_INFO_EXCEPTION("vcl", ""); } aStyle = fallbackStyle(aStyle); @@ -413,9 +414,9 @@ bool ImplImageTree::doLoadImage(ImageRequestParameters& rParameters) { throw; } - catch (const uno::Exception& e) + catch (const uno::Exception&) { - SAL_INFO("vcl", "ImplImageTree::doLoadImage exception: " << e); + TOOLS_INFO_EXCEPTION("vcl", "ImplImageTree::doLoadImage"); } if (bFound) @@ -681,9 +682,9 @@ bool ImplImageTree::checkPathAccess() { throw; } - catch (const uno::Exception & e) + catch (const uno::Exception &) { - SAL_INFO("vcl", "ImplImageTree::zip file location " << e << " for " << rIconSet.maURL); + TOOLS_INFO_EXCEPTION("vcl", "ImplImageTree::zip file location " << rIconSet.maURL); return false; } return rNameAccess.is(); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 27f027eb3224..5a0b505e2aef 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -70,6 +70,7 @@ #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <unotools/configmgr.hxx> +#include <tools/diagnose_ex.h> #include <tools/debug.hxx> #include <cassert> @@ -3288,9 +3289,9 @@ Reference< XClipboard > Window::GetClipboard() = css::datatransfer::clipboard::SystemClipboard::create( comphelper::getProcessComponentContext()); } - catch (DeploymentException & e) + catch (DeploymentException const &) { - SAL_WARN("vcl.window", "ignoring " << e); + TOOLS_WARN_EXCEPTION("vcl.window", "ignoring"); } } @@ -3329,9 +3330,9 @@ Reference< XClipboard > Window::GetPrimarySelection() mpWindowImpl->mpFrameData->mxSelection = s_xSelection; #endif } - catch (RuntimeException & e) + catch (RuntimeException const &) { - SAL_WARN("vcl.window", "ignoring " << e); + TOOLS_WARN_EXCEPTION("vcl.window", "ignoring"); } } |