diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 15:56:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-16 13:31:26 +0200 |
commit | 889dc7bffa02236bf2ad56b382997771f0fcf3c6 (patch) | |
tree | e7fc2c8748972bb1ed4acb98fd92ff08a8670f7b /sfx2 | |
parent | 9a97a26511584f41c3753fa9536e1c4a8dce637a (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 'sfx2')
-rw-r--r-- | sfx2/source/appl/appdde.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/bastyp/helper.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 3 |
13 files changed, 27 insertions, 53 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index 2247c4a72c94..a998b77b823c 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -97,8 +97,7 @@ namespace } catch( const uno::Exception& ) { - css::uno::Any ex = cppu::getCaughtException(); - SAL_WARN( "sfx.appl", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "" ); } return bRet; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 88a2cd388c16..fc936519f8a5 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -1410,8 +1410,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) } catch( const css::uno::Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxApplication::OfaExec_Impl(SID_MORE_DICTIONARIES): caught an exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxApplication::OfaExec_Impl(SID_MORE_DICTIONARIES)" ); } break; } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 2019b5fe8972..54a4e4bb664e 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2029,8 +2029,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox() } catch( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox(): unexpected exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox()" ); } sModuleName = sTemp; } @@ -2283,8 +2282,7 @@ IMPL_LINK( SfxHelpTextWindow_Impl, CheckHdl, Button*, pButton, void ) } catch( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl(): unexpected exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl()" ); } } @@ -2440,8 +2438,7 @@ void SfxHelpTextWindow_Impl::GetFocus() } catch( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus(): unexpected exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus()" ); } } @@ -2528,8 +2525,7 @@ void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const } catch( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): unexpected exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff()" ); } SAL_WARN_IF( !bSetOff, "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): set off failed" ); @@ -3101,8 +3097,7 @@ void SfxHelpWindow_Impl::CloseWindow() } catch( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow(): caught an exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow()" ); } } diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index ee6fbb63e133..d709ed3591f2 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -410,8 +410,7 @@ static OUString getCurrentModuleIdentifier_Impl() } catch (const Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxHelp::getCurrentModuleIdentifier_Impl(): exception of XModuleManager::identify() " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelp::getCurrentModuleIdentifier_Impl(): exception of XModuleManager::identify()" ); } } @@ -488,8 +487,7 @@ OUString SfxHelp::GetHelpModuleName_Impl(const OUString& rHelpID) } catch (const Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.appl", "SfxHelp::GetHelpModuleName_Impl(): " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxHelp::GetHelpModuleName_Impl()" ); } } } diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index f77f5971fd65..0976c8f80f28 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -78,8 +78,7 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL ) } catch( const uno::Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.bastyp", "GetResultSet: " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.bastyp", "GetResultSet" ); } @@ -104,8 +103,7 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL ) } catch( const uno::Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.bastyp", "XContentAccess::next(): " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.bastyp", "XContentAccess::next()" ); } } } @@ -246,8 +244,7 @@ sal_Int64 SfxContentHelper::GetSize( const OUString& rContent ) } catch( const uno::Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.bastyp", exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.bastyp", "" ); } return nSize; } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 0f1347693ad6..9d4225539351 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -1208,10 +1208,9 @@ BitmapEx ThumbnailView::readThumbnail(const OUString &msURL) } catch (const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sfx", + TOOLS_WARN_EXCEPTION("sfx", "caught exception while trying to access thumbnail of " - << msURL << ": " << exceptionToString(ex)); + << msURL); } // Extract the image from the stream. diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 5c0a32d02a87..f9a11830e925 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -133,8 +133,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) : } catch (const Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "fwk", "BackingWindow - caught an exception! " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "fwk", "BackingWindow" ); } // fdo#34392: we do the layout dynamically, the layout depends on the font, diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 011135fab81b..ec6f145054a1 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -407,15 +407,13 @@ void SfxDocumentInfoItem::UpdateDocumentInfo( } catch ( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while adding custom properties " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while adding custom properties" ); } } } catch ( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while removing custom properties " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while removing custom properties" ); } } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 402923c8dfa1..1b6b04db197e 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -490,8 +490,7 @@ void FileDialogHelper_Impl::updateExportButton() } catch( const IllegalArgumentException& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updateExportButton: caught an exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::updateExportButton" ); } } } @@ -593,8 +592,7 @@ void FileDialogHelper_Impl::updatePreviewState( bool _bUpdatePreviewWindow ) } catch( const Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updatePreviewState: caught an exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::updatePreviewState" ); } } @@ -1293,8 +1291,7 @@ sal_Int16 FileDialogHelper_Impl::implDoExecute() } catch( const Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute" ); } } @@ -1322,8 +1319,7 @@ void FileDialogHelper_Impl::implStartExecute() } catch( const Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute" ); } } } diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 35952895e99c..1e5dca13b1e7 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -572,8 +572,7 @@ collectFilesFromStorage(uno::Reference<embed::XStorage> const& i_xStorage, o_rFiles.insert(styles); } } catch (const uno::Exception &) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sfx", "collectFilesFromStorage: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sfx", "collectFilesFromStorage"); } } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index a78cacb43d13..129f256cfbe1 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1272,8 +1272,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN } catch ( const uno::Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "Locking exception: WebDAV while trying to lock the file" ); } return eResult; } @@ -1524,8 +1523,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN } catch( const uno::Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.doc", "Locking exception: high probability, that the content has not been created " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "Locking exception: high probability, that the content has not been created" ); } return eResult; @@ -2987,8 +2985,7 @@ void SfxMedium::UnlockFile( bool bReleaseLockStream ) } catch ( uno::Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "Locking exception: WebDAV while trying to lock the file" ); } } return; diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 7da29f337d47..7f2e71dd45d2 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1659,8 +1659,7 @@ void SfxDocTemplate_Impl::Rescan() } catch( const Exception& ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.doc", "SfxDocTemplate_Impl::Rescan: caught an exception while doing the update! " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "SfxDocTemplate_Impl::Rescan: caught an exception while doing the update" ); } } diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index c30544803603..8ebe36e07cd5 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -773,8 +773,7 @@ bool SfxDocTplService_Impl::createFolder( const OUString& rNewFolderURL, } catch( Exception const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sfx.doc", "createFolder(): Could not create new folder " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sfx.doc", "createFolder(): Could not create new folder" ); } } else if ( bCreateParent ) |