summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 15:56:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-16 13:31:26 +0200
commit889dc7bffa02236bf2ad56b382997771f0fcf3c6 (patch)
treee7fc2c8748972bb1ed4acb98fd92ff08a8670f7b /cui
parent9a97a26511584f41c3753fa9536e1c4a8dce637a (diff)
use more TOOLS_WARN_EXCEPTION
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/CommandCategoryListBox.cxx3
-rw-r--r--cui/source/customize/cfg.cxx12
-rw-r--r--cui/source/dialogs/scriptdlg.cxx12
-rw-r--r--cui/source/options/optjava.cxx3
-rw-r--r--cui/source/options/optlingu.cxx8
-rw-r--r--cui/source/options/optpath.cxx3
-rw-r--r--cui/source/options/optsave.cxx3
-rw-r--r--cui/source/options/optupdt.cxx6
-rw-r--r--cui/source/options/treeopt.cxx12
9 files changed, 19 insertions, 43 deletions
diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx
index e361388943c4..1591e208b7cc 100644
--- a/cui/source/customize/CommandCategoryListBox.cxx
+++ b/cui/source/customize/CommandCategoryListBox.cxx
@@ -335,8 +335,7 @@ void CommandCategoryListBox::categorySelected(CuiConfigFunctionListBox* pFunctio
}
catch( css::uno::Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.customize", "Caught some exception whilst retrieving browse nodes from factory... Exception: " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("cui.customize", "Caught some exception whilst retrieving browse nodes from factory");
// TODO exception handling
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f9d67ec32ee3..e30cb708c99b 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -577,8 +577,7 @@ bool MenuSaveInData::Apply()
}
catch ( css::uno::Exception& )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.customize", "caught some other exception saving settings " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("cui.customize", "caught some other exception saving settings");
}
SetModified( false );
@@ -2422,8 +2421,7 @@ void ToolbarSaveInData::ApplyToolbar( SvxConfigEntry* pToolbar )
}
catch ( css::uno::Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.customize", "caught exception saving settings " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("cui.customize", "caught exception saving settings");
}
PersistChanges( GetConfigManager() );
@@ -2448,8 +2446,7 @@ void ToolbarSaveInData::CreateToolbar( SvxConfigEntry* pToolbar )
}
catch ( css::uno::Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.customize", "caught exception saving settings " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("cui.customize", "caught exception saving settings");
}
GetEntries()->push_back( pToolbar );
@@ -3156,8 +3153,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
}
catch( uno::Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.customize", "Caught exception importing XGraphic: " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("cui.customize", "Caught exception importing XGraphic");
}
return result;
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 5c4035fb01dc..c3e0314502c8 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -666,8 +666,7 @@ IMPL_LINK(SvxScriptOrgDialog, ButtonHdl, weld::Button&, rButton, void)
}
catch( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.dialogs", "Caught exception trying to invoke " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to invoke" );
}
}
}
@@ -835,8 +834,7 @@ void SvxScriptOrgDialog::createEntry(weld::TreeIter& rEntry)
}
catch( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.dialogs", "Caught exception trying to Create " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to Create" );
}
}
if ( aChildNode.is() )
@@ -919,8 +917,7 @@ void SvxScriptOrgDialog::renameEntry(weld::TreeIter& rEntry)
}
catch( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.dialogs", "Caught exception trying to Rename " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to Rename" );
}
}
if ( aChildNode.is() )
@@ -968,8 +965,7 @@ void SvxScriptOrgDialog::deleteEntry(weld::TreeIter& rEntry)
}
catch( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.dialogs", "Caught exception trying to delete " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION("cui.dialogs", "Caught exception trying to delete" );
}
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 654d96ac879a..992403d27e94 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -287,8 +287,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, StartFolderPickerHdl, void*, void)
}
catch ( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "SvxJavaOptionsPage::StartFolderPickerHdl(): caught exception " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION( "cui.options", "SvxJavaOptionsPage::StartFolderPickerHdl()" );
}
}
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 945963ddc989..d9ab82538186 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -107,15 +107,9 @@ static bool KillFile_Impl( const OUString& rURL )
Content aCnt( rURL, uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aCnt.executeCommand( "delete", Any( true ) );
}
- catch( css::ucb::CommandAbortedException& )
- {
- SAL_WARN( "cui.options", "KillFile: CommandAbortedException" );
- bRet = false;
- }
catch( ... )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "KillFile: Any other exception " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION( "cui.options", "KillFile" );
bRet = false;
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 46d930d1c346..9123d5cb9fe0 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -569,8 +569,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void)
}
catch( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "SvxPathTabPage::PathHdl_Impl: exception from folder picker " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION( "cui.options", "SvxPathTabPage::PathHdl_Impl: exception from folder picker" );
}
}
else
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 64faac98f389..e0f58dfacb92 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -417,8 +417,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
}
catch(Exception const &)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "exception in FilterFactory access: " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION( "cui.options", "exception in FilterFactory access" );
}
pImpl->bInitialized = true;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 8477f07fa8f1..6f308bd6455d 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -173,8 +173,7 @@ void SvxOnlineUpdateTabPage::UpdateUserAgent()
}
}
} catch (const uno::Exception &) {
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "Unexpected exception fetching User Agent " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION( "cui.options", "Unexpected exception fetching User Agent" );
}
}
@@ -393,8 +392,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl, weld::Button&, void)
}
catch( const uno::Exception& )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN("cui.options", "Caught exception, thread terminated. " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION("cui.options", "Caught exception, thread terminated");
}
}
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 0c33c9f720ed..cb8c14df1cf3 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1419,8 +1419,7 @@ static OUString getCurrentFactory_Impl( const Reference< XFrame >& _xFrame )
}
catch ( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "getActiveModule_Impl(): exception of XModuleManager::identify() " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION( "cui.options", "getActiveModule_Impl(): exception of XModuleManager::identify()" );
}
}
@@ -1763,8 +1762,7 @@ OUString OfaTreeOptionsDialog::GetModuleIdentifier( const Reference< XFrame >& r
}
catch ( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "OfaTreeOptionsDialog::GetModuleIdentifier(): exception of XModuleManager::identify() " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION( "cui.options", "OfaTreeOptionsDialog::GetModuleIdentifier(): exception of XModuleManager::identify()");
}
}
return sModule;
@@ -2118,8 +2116,7 @@ void ExtensionsTabPage::CreateDialogWithHandler()
}
catch (const Exception&)
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "ExtensionsTabPage::CreateDialogWithHandler(): exception of XDialogProvider2::createDialogWithHandler(): " << exceptionToString(ex));
+ TOOLS_WARN_EXCEPTION( "cui.options", "ExtensionsTabPage::CreateDialogWithHandler(): exception of XDialogProvider2::createDialogWithHandler()");
}
}
@@ -2135,8 +2132,7 @@ bool ExtensionsTabPage::DispatchAction( const OUString& rAction )
}
catch ( Exception const & )
{
- css::uno::Any ex( cppu::getCaughtException() );
- SAL_WARN( "cui.options", "ExtensionsTabPage::DispatchAction(): exception of XDialogEventHandler::callHandlerMethod() " << exceptionToString(ex) );
+ TOOLS_WARN_EXCEPTION( "cui.options", "ExtensionsTabPage::DispatchAction(): exception of XDialogEventHandler::callHandlerMethod()" );
}
}
return bRet;