summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-29 16:21:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-04 15:18:00 +0200
commit2c05d758b2b62c9df413e2514fb3cd233d0f3ec7 (patch)
treee0a23d3da6fb17ae97d18957fc14f4a4a8de2d3f /desktop
parenta3088b1e72ef17babe3d3664c610afd02cfe0891 (diff)
add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx12
-rw-r--r--desktop/source/app/appinit.cxx2
-rw-r--r--desktop/source/app/check_ext_deps.cxx2
-rw-r--r--desktop/source/app/dispatchwatcher.cxx7
-rw-r--r--desktop/source/app/langselect.cxx7
-rw-r--r--desktop/source/app/opencl.cxx2
-rw-r--r--desktop/source/app/userinstall.cxx2
-rw-r--r--desktop/source/deployment/dp_log.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx8
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx10
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx6
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx4
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/migration/migration.cxx8
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.cxx2
-rw-r--r--desktop/source/offacc/acceptor.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx2
-rw-r--r--desktop/test/deployment/active/active_native.cxx2
21 files changed, 41 insertions, 53 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 7c194f890db9..cae1d3ce8b22 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -306,7 +306,7 @@ void SetRestartState() {
officecfg::Setup::Office::OfficeRestartInProgress::set(true, batch);
batch->commit();
} catch (css::uno::Exception & e) {
- SAL_WARN("desktop.app", "ignoring Exception \"" << e.Message << "\"");
+ SAL_WARN("desktop.app", "ignoring " << e);
}
}
@@ -325,7 +325,7 @@ void DoRestartActionsIfNecessary(bool quickstart) {
}
} catch (css::uno::Exception & e) {
SAL_WARN(
- "desktop.app", "ignoring Exception \"" << e.Message << "\"");
+ "desktop.app", "ignoring " << e);
}
}
}
@@ -2087,7 +2087,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- SAL_WARN( "desktop.app", "Could not disable AutoRecovery." << e.Message);
+ SAL_WARN( "desktop.app", "Could not disable AutoRecovery." << e);
}
}
else
@@ -2114,7 +2114,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- SAL_WARN( "desktop.app", "Error during recovery" << e.Message);
+ SAL_WARN( "desktop.app", "Error during recovery" << e);
}
}
else if (bExistsRecoveryData && bDisableRecovery && !rArgs.HasModuleParam())
@@ -2131,7 +2131,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message);
+ SAL_WARN( "desktop.app", "Registration of session listener failed" << e);
}
if ( !bExistsRecoveryData && xSessionListener.is() )
@@ -2143,7 +2143,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- SAL_WARN( "desktop.app", "Error in session management" << e.Message);
+ SAL_WARN( "desktop.app", "Error in session management" << e);
}
}
}
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 7512b31d0dbb..b21b98349b7f 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -157,7 +157,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
{
// no error handling needed...
// acceptor just won't come up
- SAL_WARN( "desktop.app", "Acceptor could not be created: " << e.Message);
+ SAL_WARN( "desktop.app", "Acceptor could not be created: " << e);
}
}
else
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 788686c5528a..86f6385cf4ab 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -290,7 +290,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
}
catch ( const uno::RuntimeException & ) { throw; }
catch (const uno::Exception & exc) {
- SAL_WARN( "desktop.app", "" << exc.Message );
+ SAL_WARN( "desktop.app", exc );
}
if ( bRegistered )
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 6cd75c0d5f4d..466e6eeeae11 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -473,8 +473,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
SAL_WARN(
"desktop.app",
"Desktop::OpenDefault() ignoring Exception while"
- " calling XNotifyingDispatch: \"" << e.Message
- << "\"");
+ " calling XNotifyingDispatch: " << e);
}
}
}
@@ -546,14 +545,14 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
SAL_WARN(
"desktop.app",
"Dispatchwatcher IllegalArgumentException while calling"
- " loadComponentFromURL: \"" << iae.Message << "\"");
+ " loadComponentFromURL: " << iae);
}
catch (const css::io::IOException& ioe)
{
SAL_WARN(
"desktop.app",
"Dispatchwatcher IOException while calling"
- " loadComponentFromURL: \"" << ioe.Message << "\"");
+ " loadComponentFromURL: " << ioe);
}
if ( aDispatchRequest.aRequestType == REQUEST_OPEN ||
aDispatchRequest.aRequestType == REQUEST_VIEW ||
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 3af3652de083..8d826ab3674e 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -90,9 +90,7 @@ bool prepareLocale() {
"", batch);
batch->commit();
} catch (css::uno::Exception & e) {
- SAL_WARN(
- "desktop.app",
- "ignoring Exception \"" << e.Message << "\"");
+ SAL_WARN("desktop.app", "ignoring " << e);
}
}
}
@@ -125,8 +123,7 @@ bool prepareLocale() {
officecfg::Setup::L10N::ooLocale::set(locale, batch);
batch->commit();
} catch (css::uno::Exception & e) {
- SAL_WARN(
- "desktop.app", "ignoring Exception \"" << e.Message << "\"");
+ SAL_WARN("desktop.app", "ignoring " << e);
}
}
MsLangId::setConfiguredSystemUILanguage(tag.getLanguageType(false));
diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx
index 1dfc338b51d3..9f17673ed5e5 100644
--- a/desktop/source/app/opencl.cxx
+++ b/desktop/source/app/opencl.cxx
@@ -96,7 +96,7 @@ bool testOpenCLCompute(const Reference< XDesktop2 > &xDesktop, const OUString &r
}
catch (const css::uno::Exception &e)
{
- SAL_WARN("opencl", "OpenCL testing failed - disabling: " << e.Message);
+ SAL_WARN("opencl", "OpenCL testing failed - disabling: " << e);
}
if (nKernelFailures != openclwrapper::kernelFailures)
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index 86ca552355e9..ad55d6848f7a 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -140,7 +140,7 @@ bool isCreated() {
try {
return officecfg::Setup::Office::ooSetupInstCompleted::get();
} catch (css::uno::Exception & e) {
- SAL_WARN("desktop.app", "ignoring Exception \"" << e.Message << "\"");
+ SAL_WARN("desktop.app", "ignoring " << e);
return false;
}
}
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index c03caaef2461..c3de88643003 100644
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -78,7 +78,7 @@ void ProgressLogImpl::disposing()
}
}
catch (const Exception & exc) {
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
}
@@ -136,7 +136,7 @@ void ProgressLogImpl::log_write( OString const & text )
}
}
catch (const io::IOException & exc) {
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 8b311528e7ce..59138ad44214 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -724,7 +724,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
xFilePicker->appendFilter( iPos->first, iPos->second );
}
catch (const lang::IllegalArgumentException & exc) {
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
}
xFilePicker->setCurrentFilter( sDefaultFilter );
@@ -1377,7 +1377,7 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
}
catch ( const uno::RuntimeException & ) { throw; }
catch (const uno::Exception & exc) {
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
bRegistered = false;
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index fa8724c84ccb..137d2358a02c 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -342,7 +342,7 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
throw;
}
catch (const uno::Exception & exc) {
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
return NOT_AVAILABLE;
}
}
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index a19a5c728516..5aaee07a2194 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -145,9 +145,7 @@ PackageInformationProvider::getPackageLocation( const OUString& _sExtensionId )
}
catch (const css::ucb::ContentCreationException& e)
{
- SAL_WARN(
- "desktop.deployment",
- "ignoring ContentCreationException \"" << e.Message << "\"");
+ SAL_WARN("desktop.deployment", "ignoring " << e);
}
}
return aLocationURL;
@@ -217,9 +215,7 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId )
dp_misc::getIdentifier(info.extension), info.extension->getName(),
uno::Reference<css_ucb::XCommandEnvironment>());
} catch (const lang::IllegalArgumentException& e) {
- SAL_WARN(
- "desktop.deployment",
- "ignoring IllegalArgumentException \"" << e.Message << "\"");
+ SAL_WARN("desktop.deployment", "ignoring " << e);
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 b9b849d31b8a..5667ffc126fb 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -583,7 +583,7 @@ OUString PackageManagerImpl::detectMediaType(
catch (const lang::IllegalArgumentException & exc) {
if (throw_exc)
throw;
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
}
return mediaType;
@@ -1026,11 +1026,11 @@ PackageManagerImpl::getDeployedPackages_(
}
catch (const lang::IllegalArgumentException & exc) {
// ignore
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
catch (const deployment::DeploymentException& exc) {
// ignore
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
}
return comphelper::containerToSequence(packages);
@@ -1265,7 +1265,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
}
catch( const uno::Exception & e )
{
- SAL_WARN("desktop.deployment", e.Message);
+ SAL_WARN("desktop.deployment", e);
}
}
return bModified;
@@ -1403,7 +1403,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
catch (const uno::Exception & e)
{
// Looks like exceptions being caught here is not an uncommon case.
- SAL_WARN("desktop.deployment", e.Message);
+ SAL_WARN("desktop.deployment", e);
}
}
return bModified;
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 4c5805b4b54a..bfac300cd95e 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1394,13 +1394,11 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
componentLiveInsertion(data, factories);
} catch (css::uno::Exception & e) {
SAL_INFO(
- "desktop.deployment", "caught Exception " << e.Message);
+ "desktop.deployment", "caught " << e);
try {
impreg->revokeImplementation(url, rdb);
} catch (css::uno::RuntimeException & e2) {
- SAL_WARN(
- "desktop.deployment",
- "ignored RuntimeException " << e2.Message);
+ SAL_WARN("desktop.deployment", "ignored " << e2);
}
throw;
}
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index f55910f13699..8bebe6cbec98 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -648,9 +648,7 @@ void Package::processPackage_impl(
static_cast< OWeakObject * >(this), e);
}
catch (const RuntimeException &e) {
- SAL_WARN(
- "desktop.deployment",
- "unexpected RuntimeException \"" << e.Message << '"');
+ SAL_WARN("desktop.deployment", "unexpected " << e);
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 d3d29d904dfc..af12c6b09f3f 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1059,7 +1059,7 @@ void BackendImpl::PackageImpl::exportTo(
::cppu::getCaughtException() ) );
}
catch (const lang::IllegalArgumentException & exc) {
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
std::vector< Sequence<beans::PropertyValue> > manifest;
@@ -1141,7 +1141,7 @@ void BackendImpl::PackageImpl::exportTo(
catch (const css::ucb::ContentCreationException &e)
{
SAL_WARN(
- "desktop.deployment", "exception on overwriting manifest: " << e.Message);
+ "desktop.deployment", "exception on overwriting manifest: " << e);
}
if (!bSuccess)
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 70e2372097b1..d84e09c9c7d9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1299,7 +1299,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: " << exception.Message);
+ SAL_INFO("lok", "Document can't be loaded: " << exception);
}
return nullptr;
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 7361419637f9..e03a103766bd 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -206,7 +206,7 @@ void Migration::migrateSettingsIfNecessary()
try {
bResult = aImpl.doMigration();
} catch (const Exception& e) {
- SAL_WARN( "desktop", "doMigration() exception: " << e.Message);
+ SAL_WARN( "desktop", "doMigration(): " << e);
}
OSL_ENSURE(bResult, "Migration has not been successful");
}
@@ -294,7 +294,7 @@ bool MigrationImpl::doMigration()
} catch (css::uno::Exception & e) {
SAL_WARN(
"desktop.migration",
- "ignored Exception \"" << e.Message
+ "ignored Exception \"" << e
<< "\" while migrating from version \"" << m_aInfo.productname
<< "\" data \"" << m_aInfo.userdata << "\"");
}
@@ -805,7 +805,7 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
sAccessSrvc, theArgs ), uno::UNO_QUERY_THROW );
} catch (const css::uno::Exception& e) {
SAL_WARN(
- "desktop.migration", "ignoring Exception \"" << e.Message << "\"");
+ "desktop.migration", "ignoring Exception \"" << e << "\"");
}
return xNameAccess;
}
@@ -884,7 +884,7 @@ void MigrationImpl::runServices()
} catch (const Exception& e) {
SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: "
<< i_mig->service
- << "\nMessage: " << e.Message);
+ << "\nMessage: " << e);
} catch (...) {
SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: "
<< i_mig->service << "\nNo message available");
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index fb1458767139..98281a3ecc4e 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -287,7 +287,7 @@ void OO3ExtensionMigration::migrateExtension( const OUString& sSourceDir )
SAL_WARN(
"desktop.migration",
"Ignoring UNO Exception while migrating extension from <"
- << sSourceDir << ">: \"" << e.Message << "\"");
+ << sSourceDir << ">: " << e);
}
}
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index b7029d489f15..80c9a7cc722a 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -118,7 +118,7 @@ void Acceptor::run()
osl::MutexGuard g(m_aMutex);
m_bridges.add(rBridge);
} catch (const Exception& e) {
- SAL_WARN("desktop.offacc", "caught Exception \"" << e.Message << "\"");
+ SAL_WARN("desktop.offacc", "caught " << e);
// connection failed...
// something went wrong during connection setup.
// just wait for a new connection to accept
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 30f5573ad038..49e2274b0056 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -125,7 +125,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
xComp->dispose();
}
catch (const RuntimeException & exc) {
- SAL_WARN( "desktop", exc.Message );
+ SAL_WARN( "desktop", exc );
}
}
diff --git a/desktop/test/deployment/active/active_native.cxx b/desktop/test/deployment/active/active_native.cxx
index 0c1154bcc441..3a2af3f9c2dc 100644
--- a/desktop/test/deployment/active/active_native.cxx
+++ b/desktop/test/deployment/active/active_native.cxx
@@ -267,7 +267,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
} catch (const css::uno::Exception & e) {
SAL_INFO(
"desktop.test",
- "active_native component_writeInfo exception: " << e.Message);
+ "active_native component_writeInfo: " << e);
return false;
}
return true;