summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-01 14:42:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-07 07:12:39 +0100
commit8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 (patch)
treed41feeea533127280e0503d0dc2dd55a4ab83ce8 /cui/source/options
parent4f810905fa74128871f2fe924a3d28a79f4e4261 (diff)
log nice exception messages whereever possible
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/optjava.cxx6
-rw-r--r--cui/source/options/optlingu.cxx4
-rw-r--r--cui/source/options/optpath.cxx5
-rw-r--r--cui/source/options/optsave.cxx6
-rw-r--r--cui/source/options/optupdt.cxx9
-rw-r--r--cui/source/options/treeopt.cxx25
6 files changed, 33 insertions, 22 deletions
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 69b1b82c092d..34f8de7c3f4b 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -45,6 +45,7 @@
#include <vcl/treelistentry.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/inputdlg.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -354,9 +355,10 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, StartFolderPickerHdl, void*, void)
else if ( xFolderPicker.is() && xFolderPicker->execute() == ExecutableDialogResults::OK )
AddFolder( xFolderPicker->getDirectory() );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "cui.options", "SvxJavaOptionsPage::StartFolderPickerHdl(): caught exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "SvxJavaOptionsPage::StartFolderPickerHdl(): caught exception " << exceptionToString(ex) );
}
}
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 1d4f603dec79..eb9aaadf78c1 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -32,6 +32,7 @@
#include <sfx2/sfxuno.hxx>
#include <sfx2/dispatch.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
@@ -135,7 +136,8 @@ static bool KillFile_Impl( const OUString& rURL )
}
catch( ... )
{
- SAL_WARN( "cui.options", "KillFile: Any other exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "KillFile: Any other exception " << exceptionToString(ex) );
bRet = false;
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 8e6bc7d2541c..663532701a71 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -629,9 +629,10 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, Button*, void)
ChangeCurrentEntry(sFolder);
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "cui.options", "SvxPathTabPage::PathHdl_Impl: exception from folder picker" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "SvxPathTabPage::PathHdl_Impl: exception from folder picker " << exceptionToString(ex) );
}
}
else if (pEntry)
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index e44eb7dbf216..9aabe400d7f8 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -37,6 +37,7 @@
#include <unotools/optionsdlg.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <sfx2/fcontnr.hxx>
@@ -445,9 +446,10 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
aDocTypeLB->SelectEntryPos(0);
FilterHdl_Impl(*aDocTypeLB);
}
- catch(Exception& e)
+ catch(Exception const &)
{
- SAL_WARN( "cui.options", "exception in FilterFactory access: " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "exception in FilterFactory access: " << exceptionToString(ex) );
}
pImpl->bInitialized = true;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 396cf5aaa5b7..33b70f558718 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -40,6 +40,7 @@
#include <osl/file.hxx>
#include <osl/security.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::css;
@@ -193,7 +194,8 @@ void SvxOnlineUpdateTabPage::UpdateUserAgent()
}
}
} catch (const uno::Exception &) {
- SAL_WARN( "cui.options", "Unexpected exception fetching User Agent" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "Unexpected exception fetching User Agent " << exceptionToString(ex) );
}
}
@@ -410,9 +412,10 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl, Button*, void)
UpdateLastCheckedText();
}
- catch( const uno::Exception& e )
+ catch( const uno::Exception& )
{
- SAL_WARN("cui.options", "Caught exception, thread terminated. " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.options", "Caught exception, thread terminated. " << exceptionToString(ex));
}
}
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 27f8aa4dcb5e..909150c42465 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -94,6 +94,7 @@
#include <svx/xpool.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/configmgr.hxx>
#include <unotools/linguprops.hxx>
#include <unotools/misccfg.hxx>
@@ -1410,9 +1411,10 @@ static OUString getCurrentFactory_Impl( const Reference< XFrame >& _xFrame )
{
SAL_INFO( "cui.options", "unknown module" );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "cui.options", "getActiveModule_Impl(): exception of XModuleManager::identify()" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "getActiveModule_Impl(): exception of XModuleManager::identify() " << exceptionToString(ex) );
}
}
@@ -1753,9 +1755,10 @@ OUString OfaTreeOptionsDialog::GetModuleIdentifier( const Reference< XFrame >& r
{
SAL_INFO( "cui.options", "unknown module" );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "cui.options", "OfaTreeOptionsDialog::GetModuleIdentifier(): exception of XModuleManager::identify()" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "OfaTreeOptionsDialog::GetModuleIdentifier(): exception of XModuleManager::identify() " << exceptionToString(ex));
}
}
return sModule;
@@ -2111,13 +2114,10 @@ void ExtensionsTabPage::CreateDialogWithHandler()
}
}
}
- catch (const css::lang::IllegalArgumentException& e)
+ catch (const Exception&)
{
- SAL_WARN("cui.options", "ExtensionsTabPage::CreateDialogWithHandler(): illegal argument:" << e);
- }
- catch (const Exception& e)
- {
- SAL_WARN( "cui.options", "ExtensionsTabPage::CreateDialogWithHandler(): exception of XDialogProvider2::createDialogWithHandler(): " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "ExtensionsTabPage::CreateDialogWithHandler(): exception of XDialogProvider2::createDialogWithHandler(): " << exceptionToString(ex));
}
}
@@ -2131,9 +2131,10 @@ bool ExtensionsTabPage::DispatchAction( const OUString& rAction )
{
bRet = m_xEventHdl->callHandlerMethod( m_xPage, Any( rAction ), "external_event" );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "cui.options", "ExtensionsTabPage::DispatchAction(): exception of XDialogEventHandler::callHandlerMethod()" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "cui.options", "ExtensionsTabPage::DispatchAction(): exception of XDialogEventHandler::callHandlerMethod() " << exceptionToString(ex) );
}
}
return bRet;