diff options
-rw-r--r-- | desktop/Library_offacc.mk | 1 | ||||
-rw-r--r-- | desktop/source/app/app.cxx | 25 | ||||
-rw-r--r-- | desktop/source/app/appinit.cxx | 5 | ||||
-rw-r--r-- | desktop/source/app/dispatchwatcher.cxx | 22 | ||||
-rw-r--r-- | desktop/source/app/langselect.cxx | 9 | ||||
-rw-r--r-- | desktop/source/app/opencl.cxx | 5 | ||||
-rw-r--r-- | desktop/source/app/userinstall.cxx | 5 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_informationprovider.cxx | 9 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_manager.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 10 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_backend.cxx | 5 | ||||
-rw-r--r-- | desktop/source/deployment/registry/package/dp_package.cxx | 5 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 2 | ||||
-rw-r--r-- | desktop/source/migration/migration.cxx | 24 | ||||
-rw-r--r-- | desktop/source/migration/services/oo3extensionmigration.cxx | 8 | ||||
-rw-r--r-- | desktop/source/offacc/acceptor.cxx | 5 |
16 files changed, 75 insertions, 73 deletions
diff --git a/desktop/Library_offacc.mk b/desktop/Library_offacc.mk index e02946b76692..b50dd4441dce 100644 --- a/desktop/Library_offacc.mk +++ b/desktop/Library_offacc.mk @@ -16,6 +16,7 @@ $(eval $(call gb_Library_use_libraries,offacc,\ cppu \ cppuhelper \ sal \ + tl \ )) $(eval $(call gb_Library_set_componentfile,offacc,desktop/source/offacc/offacc)) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 3874b39270e5..bda1df98f6da 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -305,8 +305,8 @@ void SetRestartState() { comphelper::ConfigurationChanges::create()); officecfg::Setup::Office::OfficeRestartInProgress::set(true, batch); batch->commit(); - } catch (css::uno::Exception & e) { - SAL_WARN("desktop.app", "ignoring " << e); + } catch (css::uno::Exception) { + TOOLS_WARN_EXCEPTION("desktop.app", "ignoring"); } } @@ -323,9 +323,8 @@ void DoRestartActionsIfNecessary(bool quickstart) { comphelper::getProcessComponentContext(), shouldLaunchQuickstart()); } - } catch (css::uno::Exception & e) { - SAL_WARN( - "desktop.app", "ignoring " << e); + } catch (css::uno::Exception &) { + TOOLS_WARN_EXCEPTION("desktop.app", "ignoring"); } } } @@ -2023,9 +2022,9 @@ void Desktop::OpenClients() xRecovery->dispatch(aCmd, css::uno::Sequence< css::beans::PropertyValue >()); } - catch(const css::uno::Exception& e) + catch(const css::uno::Exception&) { - SAL_WARN( "desktop.app", "Could not disable AutoRecovery." << e); + TOOLS_WARN_EXCEPTION( "desktop.app", "Could not disable AutoRecovery."); } } else @@ -2052,9 +2051,9 @@ void Desktop::OpenClients() false , // false => force recovery instead of emergency save bExistsRecoveryData); } - catch(const css::uno::Exception& e) + catch(const css::uno::Exception&) { - SAL_WARN( "desktop.app", "Error during recovery" << e); + TOOLS_WARN_EXCEPTION( "desktop.app", "Error during recovery"); } } @@ -2066,9 +2065,9 @@ void Desktop::OpenClients() xSessionListener = SessionListener::createWithOnQuitFlag( ::comphelper::getProcessComponentContext(), bUIOnSessionShutdownAllowed); } - catch(const css::uno::Exception& e) + catch(const css::uno::Exception&) { - SAL_WARN( "desktop.app", "Registration of session listener failed" << e); + TOOLS_WARN_EXCEPTION( "desktop.app", "Registration of session listener failed"); } if ( !bExistsRecoveryData && xSessionListener.is() ) @@ -2078,9 +2077,9 @@ void Desktop::OpenClients() { xSessionListener->doRestore(); } - catch(const css::uno::Exception& e) + catch(const css::uno::Exception&) { - SAL_WARN( "desktop.app", "Error in session management" << e); + TOOLS_WARN_EXCEPTION( "desktop.app", "Error in session management"); } } } diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 2363b36722f0..642733efceb2 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -44,6 +44,7 @@ #include <rtl/ustrbuf.hxx> #include <rtl/bootstrap.hxx> #include <sal/log.hxx> +#include <tools/diagnose_ex.h> #include <rtl/instance.hxx> #include <comphelper/processfactory.hxx> @@ -159,11 +160,11 @@ void Desktop::createAcceptor(const OUString& aAcceptString) rAcceptor->initialize( aSeq ); rMap.emplace(aAcceptString, rAcceptor); } - catch (const css::uno::Exception& e) + catch (const css::uno::Exception&) { // no error handling needed... // acceptor just won't come up - SAL_WARN( "desktop.app", "Acceptor could not be created: " << e); + TOOLS_WARN_EXCEPTION( "desktop.app", "Acceptor could not be created"); } } else diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 37fe079d18dc..96f0a7f69168 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -55,6 +55,7 @@ #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <comphelper/sequence.hxx> +#include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> #include <unotools/mediadescriptor.hxx> #include <unotools/tempfile.hxx> @@ -446,12 +447,11 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest else xDispatcher->dispatch( aURL, aArgs2 ); } - catch (const css::uno::Exception& e) + catch (const css::uno::Exception&) { - SAL_WARN( + TOOLS_WARN_EXCEPTION( "desktop.app", - "Desktop::OpenDefault() ignoring Exception while" - " calling XNotifyingDispatch: " << e); + "Desktop::OpenDefault() ignoring Exception while calling XNotifyingDispatch"); } } } @@ -503,19 +503,17 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest xDesktop, aName, aTarget, comphelper::containerToSequence(aArgs)), UNO_QUERY); } - catch (const css::lang::IllegalArgumentException& iae) + catch (const css::lang::IllegalArgumentException&) { - SAL_WARN( + TOOLS_WARN_EXCEPTION( "desktop.app", - "Dispatchwatcher IllegalArgumentException while calling" - " loadComponentFromURL: " << iae); + "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL"); } - catch (const css::io::IOException& ioe) + catch (const css::io::IOException&) { - SAL_WARN( + TOOLS_WARN_EXCEPTION( "desktop.app", - "Dispatchwatcher IOException while calling" - " loadComponentFromURL: " << ioe); + "Dispatchwatcher IOException while calling loadComponentFromURL"); } if ( aDispatchRequest.aRequestType == REQUEST_OPEN || aDispatchRequest.aRequestType == REQUEST_VIEW || diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index 86ce7434e6ab..57f7d3831ff9 100644 --- a/desktop/source/app/langselect.cxx +++ b/desktop/source/app/langselect.cxx @@ -38,6 +38,7 @@ #include <sal/types.h> #include <svl/languageoptions.hxx> #include <svtools/langhelp.hxx> +#include <tools/diagnose_ex.h> #include <app.hxx> @@ -90,8 +91,8 @@ bool prepareLocale() { officecfg::Office::Linguistic::General::UILocale::set( "", batch); batch->commit(); - } catch (css::uno::Exception & e) { - SAL_WARN("desktop.app", "ignoring " << e); + } catch (const css::uno::Exception &) { + TOOLS_WARN_EXCEPTION("desktop.app", "ignoring"); } } } @@ -123,8 +124,8 @@ bool prepareLocale() { comphelper::ConfigurationChanges::create()); officecfg::Setup::L10N::ooLocale::set(locale, batch); batch->commit(); - } catch (css::uno::Exception & e) { - SAL_WARN("desktop.app", "ignoring " << e); + } catch (const css::uno::Exception &) { + TOOLS_WARN_EXCEPTION("desktop.app", "ignoring"); } } MsLangId::setConfiguredSystemUILanguage(tag.getLanguageType(false)); diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx index 92d720eeae9f..16da10e50206 100644 --- a/desktop/source/app/opencl.cxx +++ b/desktop/source/app/opencl.cxx @@ -25,6 +25,7 @@ #include <officecfg/Office/Common.hxx> #include <svl/documentlockfile.hxx> +#include <tools/diagnose_ex.h> #include <com/sun/star/table/XCell2.hpp> #include <com/sun/star/sheet/XCalculatable.hpp> @@ -162,9 +163,9 @@ static bool testOpenCLCompute(const Reference< XDesktop2 > &xDesktop, const OUSt bSuccess = true; } } - catch (const css::uno::Exception &e) + catch (const css::uno::Exception &) { - SAL_WARN("opencl", "OpenCL testing failed - disabling: " << e); + TOOLS_WARN_EXCEPTION("opencl", "OpenCL testing failed - disabling"); } if (nKernelFailures != openclwrapper::kernelFailures) diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx index 2fa7f5befa69..55c5a6fa01b0 100644 --- a/desktop/source/app/userinstall.cxx +++ b/desktop/source/app/userinstall.cxx @@ -30,6 +30,7 @@ #include <rtl/bootstrap.hxx> #include <rtl/ustring.hxx> #include <sal/log.hxx> +#include <tools/diagnose_ex.h> #include <unotools/bootstrap.hxx> #include "userinstall.hxx" @@ -146,8 +147,8 @@ Status create(OUString const & uri) { bool isCreated() { try { return officecfg::Setup::Office::ooSetupInstCompleted::get(); - } catch (css::uno::Exception & e) { - SAL_WARN("desktop.app", "ignoring " << e); + } catch (const css::uno::Exception &) { + TOOLS_WARN_EXCEPTION("desktop.app", "ignoring"); return false; } } diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx index caa1d2b7d8bb..5eafb605c91a 100644 --- a/desktop/source/deployment/manager/dp_informationprovider.cxx +++ b/desktop/source/deployment/manager/dp_informationprovider.cxx @@ -39,6 +39,7 @@ #include <osl/diagnose.h> #include <sal/log.hxx> #include <rtl/ustring.hxx> +#include <tools/diagnose_ex.h> #include <ucbhelper/content.hxx> #include <dp_dependencies.hxx> @@ -144,9 +145,9 @@ PackageInformationProvider::getPackageLocation( const OUString& _sExtensionId ) ::ucbhelper::Content aContent( aLocationURL, nullptr, mxContext ); aLocationURL = aContent.getURL(); } - catch (const css::ucb::ContentCreationException& e) + catch (const css::ucb::ContentCreationException&) { - SAL_WARN("desktop.deployment", "ignoring " << e); + TOOLS_WARN_EXCEPTION("desktop.deployment", "ignoring"); } } return aLocationURL; @@ -215,8 +216,8 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId ) extensions = extMgr->getExtensionsWithSameIdentifier( dp_misc::getIdentifier(info.extension), info.extension->getName(), uno::Reference<css_ucb::XCommandEnvironment>()); - } catch (const lang::IllegalArgumentException& e) { - SAL_WARN("desktop.deployment", "ignoring " << e); + } catch (const lang::IllegalArgumentException&) { + TOOLS_WARN_EXCEPTION("desktop.deployment", "ignoring"); continue; } OSL_ASSERT(extensions.getLength() == 3); diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 603fb254acee..78473d35bff9 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -1279,9 +1279,9 @@ bool PackageManagerImpl::synchronizeRemovedExtensions( bModified = true; } } - catch( const uno::Exception & e ) + catch( const uno::Exception & ) { - SAL_WARN("desktop.deployment", e); + TOOLS_WARN_EXCEPTION("desktop.deployment", ""); } } return bModified; @@ -1416,10 +1416,10 @@ bool PackageManagerImpl::synchronizeAddedExtensions( } } } - catch (const uno::Exception & e) + catch (const uno::Exception &) { // Looks like exceptions being caught here is not an uncommon case. - SAL_WARN("desktop.deployment", e); + TOOLS_WARN_EXCEPTION("desktop.deployment", ""); } } return bModified; diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 7167d2d1748a..98ff6a52a888 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -35,6 +35,7 @@ #include <comphelper/sequence.hxx> #include <xmlscript/xml_helper.hxx> #include <svl/inettype.hxx> +#include <tools/diagnose_ex.h> #include <com/sun/star/deployment/DeploymentException.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/container/XNameContainer.hpp> @@ -1373,13 +1374,12 @@ void BackendImpl::ComponentPackageImpl::processPackage_( if (!startup) { try { componentLiveInsertion(data, factories); - } catch (css::uno::Exception & e) { - SAL_INFO( - "desktop.deployment", "caught " << e); + } catch (css::uno::Exception &) { + TOOLS_INFO_EXCEPTION("desktop.deployment", "caught"); try { impreg->revokeImplementation(url, rdb); - } catch (css::uno::RuntimeException & e2) { - SAL_WARN("desktop.deployment", "ignored " << e2); + } catch (css::uno::RuntimeException &) { + TOOLS_WARN_EXCEPTION("desktop.deployment", "ignored"); } throw; } diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 58049f46e9b9..23b61e3cf1e1 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/beans/StringPair.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> +#include <tools/diagnose_ex.h> #include <unotools/tempfile.hxx> #include <boost/optional.hpp> @@ -647,8 +648,8 @@ void Package::processPackage_impl( + getDisplayName()), static_cast< OWeakObject * >(this), e); } - catch (const RuntimeException &e) { - SAL_WARN("desktop.deployment", "unexpected " << e); + catch (const RuntimeException &) { + TOOLS_WARN_EXCEPTION("desktop.deployment", "unexpected"); throw; } catch (const CommandFailedException &) { diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 6357eef886ef..eba0652977fc 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -1135,10 +1135,9 @@ void BackendImpl::PackageImpl::exportTo( OUString(), ucb::NameClash::OVERWRITE ); bSuccess = true; } - catch (const css::ucb::ContentCreationException &e) + catch (const css::ucb::ContentCreationException &) { - SAL_WARN( - "desktop.deployment", "exception on overwriting manifest: " << e); + TOOLS_WARN_EXCEPTION("desktop.deployment", "exception on overwriting manifest"); } if (!bSuccess) diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a8fd89e4d523..64e3c5456aa9 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1752,7 +1752,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, catch (const uno::Exception& exception) { pLib->maLastExceptionMsg = exception.Message; - SAL_INFO("lok", "Document can't be loaded: " << exception); + TOOLS_INFO_EXCEPTION("lok", "Document can't be loaded"); } return nullptr; diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 1716a9f54325..6f481014dda9 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -36,6 +36,7 @@ #include <rtl/bootstrap.hxx> #include <rtl/uri.hxx> #include <i18nlangtag/lang.h> +#include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> #include <osl/file.hxx> #include <osl/security.hxx> @@ -205,8 +206,8 @@ void Migration::migrateSettingsIfNecessary() bool bResult = false; try { bResult = aImpl.doMigration(); - } catch (const Exception& e) { - SAL_WARN( "desktop", "doMigration(): " << e); + } catch (const Exception&) { + TOOLS_WARN_EXCEPTION( "desktop", "doMigration()"); } OSL_ENSURE(bResult, "Migration has not been successful"); } @@ -290,11 +291,10 @@ bool MigrationImpl::doMigration() uno::UNO_QUERY_THROW)->refresh(); result = true; - } catch (css::uno::Exception & e) { - SAL_WARN( + } catch (const css::uno::Exception &) { + TOOLS_WARN_EXCEPTION( "desktop.migration", - "ignored Exception \"" << e - << "\" while migrating from version \"" << m_aInfo.productname + "ignored Exception while migrating from version \"" << m_aInfo.productname << "\" data \"" << m_aInfo.userdata << "\""); } @@ -757,9 +757,8 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa xNameAccess.set( theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), uno::UNO_QUERY_THROW ); - } catch (const css::uno::Exception& e) { - SAL_WARN( - "desktop.migration", "ignoring Exception \"" << e << "\""); + } catch (const css::uno::Exception&) { + TOOLS_WARN_EXCEPTION("desktop.migration", "ignoring"); } return xNameAccess; } @@ -834,10 +833,9 @@ void MigrationImpl::runServices() xMigrationJob->execute(uno::Sequence< NamedValue >()); - } catch (const Exception& e) { - SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: " - << rMigration.service - << "\nMessage: " << e); + } catch (const Exception&) { + TOOLS_WARN_EXCEPTION( "desktop", "Execution of migration service failed. Service: " + << rMigration.service); } catch (...) { SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: " << rMigration.service << "\nNo message available"); diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index ae46322a9092..b04b7d2e108a 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -23,6 +23,7 @@ #include <sal/log.hxx> #include <osl/file.hxx> #include <osl/thread.h> +#include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> #include <unotools/bootstrap.hxx> #include <unotools/textsearch.hxx> @@ -269,12 +270,11 @@ void OO3ExtensionMigration::migrateExtension( const OUString& sSourceDir ) sSourceDir, uno::Sequence<beans::NamedValue>(), "user", xAbortChannel, xCmdEnv ); } - catch ( css::uno::Exception & e ) + catch ( css::uno::Exception & ) { - SAL_WARN( + TOOLS_WARN_EXCEPTION( "desktop.migration", - "Ignoring UNO Exception while migrating extension from <" - << sSourceDir << ">: " << e); + "Ignoring UNO Exception while migrating extension from <" << sSourceDir << ">"); } } diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index 26fcab414c4c..9c7991a9df44 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -28,6 +28,7 @@ #include <cppuhelper/factory.hxx> #include <cppuhelper/supportsservice.hxx> #include <sal/log.hxx> +#include <tools/diagnose_ex.h> using namespace css::bridge; using namespace css::connection; @@ -121,8 +122,8 @@ void Acceptor::run() "", m_aProtocol, rConnection, rInstanceProvider); osl::MutexGuard g(m_aMutex); m_bridges.add(rBridge); - } catch (const Exception& e) { - SAL_WARN("desktop.offacc", "caught " << e); + } catch (const Exception&) { + TOOLS_WARN_EXCEPTION("desktop.offacc", ""); // connection failed... // something went wrong during connection setup. // just wait for a new connection to accept |