diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-17 08:21:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 09:27:59 +0200 |
commit | e1eb7cb04a4c30cec238ab0f54d41a6cdc3299c1 (patch) | |
tree | 1c54b75238c4607a2b86f160c69b0287e350e573 /stoc | |
parent | e080acf2211af3f2b55cf59f04272a9a43188abe (diff) |
loplugin:logexceptionnicely in starmath..svgio
Change-Id: I356e574e28338f6fddc6932b4e41a461d851406d
Reviewed-on: https://gerrit.libreoffice.org/74141
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/Library_bootstrap.mk | 1 | ||||
-rw-r--r-- | stoc/Library_javaloader.mk | 1 | ||||
-rw-r--r-- | stoc/Library_javavm.mk | 1 | ||||
-rw-r--r-- | stoc/source/javaloader/javaloader.cxx | 7 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 17 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 13 |
6 files changed, 22 insertions, 18 deletions
diff --git a/stoc/Library_bootstrap.mk b/stoc/Library_bootstrap.mk index bf5a75f55b6c..b31359663de6 100644 --- a/stoc/Library_bootstrap.mk +++ b/stoc/Library_bootstrap.mk @@ -31,6 +31,7 @@ $(eval $(call gb_Library_use_libraries,bootstrap,\ reg \ sal \ salhelper \ + tl \ )) $(eval $(call gb_Library_set_componentfile,bootstrap,stoc/util/bootstrap)) diff --git a/stoc/Library_javaloader.mk b/stoc/Library_javaloader.mk index f0b11fb4a9dc..caf4a1e27df6 100644 --- a/stoc/Library_javaloader.mk +++ b/stoc/Library_javaloader.mk @@ -19,6 +19,7 @@ $(eval $(call gb_Library_use_libraries,javaloader,\ jvmaccess \ sal \ salhelper \ + tl \ )) $(eval $(call gb_Library_set_componentfile,javaloader,stoc/source/javaloader/javaloader)) diff --git a/stoc/Library_javavm.mk b/stoc/Library_javavm.mk index 84e29e8556e0..ce5f773ef394 100644 --- a/stoc/Library_javavm.mk +++ b/stoc/Library_javavm.mk @@ -21,6 +21,7 @@ $(eval $(call gb_Library_use_libraries,javavm,\ jvmfwk \ sal \ salhelper \ + tl \ )) $(eval $(call gb_Library_set_componentfile,javavm,stoc/source/javavm/javavm)) diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index 760f6d356a3c..e980d7dddebe 100644 --- a/stoc/source/javaloader/javaloader.cxx +++ b/stoc/source/javaloader/javaloader.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <cppuhelper/exc_hlp.hxx> +#include <tools/diagnose_ex.h> #ifdef LINUX #undef minor @@ -343,10 +344,8 @@ static css::uno::Reference<XInterface> JavaComponentLoader_CreateInstance(const static css::uno::Reference< XInterface > xStaticRef = *new JavaComponentLoader(xCtx); xRet = xStaticRef; } - catch(const RuntimeException & runtimeException) { - SAL_INFO( - "stoc", - "could not init javaloader due to " << runtimeException); + catch(const RuntimeException &) { + TOOLS_INFO_EXCEPTION("stoc", "could not init javaloader"); throw; } diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 7f253f0ea7eb..eaecc2a91174 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -60,6 +60,7 @@ #include <rtl/ustring.hxx> #include <sal/types.h> #include <sal/log.hxx> +#include <tools/diagnose_ex.h> #include <uno/current_context.hxx> #include <jvmfwk/framework.hxx> #include <i18nlangtag/languagetag.hxx> @@ -527,23 +528,23 @@ void initVMConfiguration( try { getINetPropsFromConfig(&jvm, xSMgr, xCtx); } - catch(const css::uno::Exception & exception) { - SAL_INFO("stoc", "can not get INETProps because of " << exception); + catch(const css::uno::Exception &) { + TOOLS_INFO_EXCEPTION("stoc", "can not get INETProps"); } try { getDefaultLocaleFromConfig(&jvm, xSMgr,xCtx); } - catch(const css::uno::Exception & exception) { - SAL_INFO("stoc", "can not get locale because of " << exception); + catch(const css::uno::Exception &) { + TOOLS_INFO_EXCEPTION("stoc", "can not get locale"); } try { getJavaPropsFromSafetySettings(&jvm, xSMgr, xCtx); } - catch(const css::uno::Exception & exception) { - SAL_INFO("stoc", "couldn't get safety settings because of " << exception); + catch(const css::uno::Exception &) { + TOOLS_INFO_EXCEPTION("stoc", "couldn't get safety settings"); } *pjvm= jvm; @@ -1330,9 +1331,9 @@ void JavaVirtualMachine::registerConfigChangesListener() if (m_xJavaConfiguration.is()) m_xJavaConfiguration->addContainerListener(this); } - }catch(const css::uno::Exception & e) + }catch(const css::uno::Exception &) { - SAL_INFO("stoc", "could not set up listener for Configuration because of >" << e << "<"); + TOOLS_INFO_EXCEPTION("stoc", "could not set up listener for Configuration"); } } diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 9d6f0e0d0c0a..5f38ec917c71 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -24,6 +24,7 @@ #include <osl/diagnose.h> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> +#include <tools/diagnose_ex.h> #include <cppuhelper/factory.hxx> #include <cppuhelper/weakref.hxx> @@ -619,9 +620,9 @@ void OServiceManager::disposing() if( xComp.is() ) xComp->dispose(); } - catch (const RuntimeException & exc) + catch (const RuntimeException &) { - SAL_INFO("stoc", "RuntimeException occurred upon disposing factory: " << exc); + TOOLS_INFO_EXCEPTION("stoc", "RuntimeException occurred upon disposing factory:"); } } @@ -807,9 +808,9 @@ Reference< XInterface > OServiceManager::createInstanceWithContext( } } } - catch (const lang::DisposedException & exc) + catch (const lang::DisposedException &) { - SAL_INFO("stoc", "DisposedException occurred: " << exc); + TOOLS_INFO_EXCEPTION("stoc", ""); } } @@ -861,9 +862,9 @@ Reference< XInterface > OServiceManager::createInstanceWithArgumentsAndContext( } } } - catch (const lang::DisposedException & exc) + catch (const lang::DisposedException &) { - SAL_INFO("stoc", "DisposedException occurred: " << exc); + TOOLS_INFO_EXCEPTION("stoc", "DisposedException occurred:"); } } |