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>
This commit is contained in:
Noel Grandin 2019-06-17 08:21:42 +02:00
parent e080acf221
commit e1eb7cb04a
8 changed files with 28 additions and 22 deletions

View file

@ -26,6 +26,7 @@
#include <unotools/mediadescriptor.hxx>
#include <sal/log.hxx>
#include <sot/storage.hxx>
#include <tools/diagnose_ex.h>
#include "eqnolefilehdr.hxx"
@ -83,9 +84,9 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
}
}
}
catch (const css::ucb::ContentCreationException &e)
catch (const css::ucb::ContentCreationException &)
{
SAL_WARN("starmath", "SmFilterDetect::detect caught " << e);
TOOLS_WARN_EXCEPTION("starmath", "SmFilterDetect::detect caught" );
}
if (!bStorageOk)

View file

@ -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))

View file

@ -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))

View file

@ -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))

View file

@ -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;
}

View file

@ -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");
}
}

View file

@ -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:");
}
}

View file

@ -31,6 +31,7 @@
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <svgdocumenthandler.hxx>
#include <tools/diagnose_ex.h>
#include <svgvisitor.hxx>
@ -135,9 +136,9 @@ namespace svgio
// be processable from all our processors
xParser->parseStream(myInputSource);
}
catch(const uno::Exception& e)
catch(const uno::Exception&)
{
SAL_INFO( "svg", "Parse error: " << e);
TOOLS_INFO_EXCEPTION( "svg", "Parse error");
return false;
}