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 /sw/source | |
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 'sw/source')
-rw-r--r-- | sw/source/core/access/accmap.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/edit/edundo.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/xml/swxml.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlfmt.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocumentproperties.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mmconfigitem.cxx | 9 |
8 files changed, 17 insertions, 34 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 28910e2b5cb5..cb5709c54901 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -201,8 +201,7 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/, } catch( uno::RuntimeException const & ) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.a11y", "Runtime exception caught while notifying shape: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.a11y", "Runtime exception caught while notifying shape"); } } } diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index ca6af57ed6e3..6eb7cb365cf0 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -136,8 +136,7 @@ void SwEditShell::Undo(sal_uInt16 const nCount) || bRet; } } catch (const css::uno::Exception &) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.core", "SwEditShell::Undo(): exception caught: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.core", "SwEditShell::Undo()"); } if (bRestoreCursor) @@ -190,8 +189,7 @@ void SwEditShell::Redo(sal_uInt16 const nCount) || bRet; } } catch (const css::uno::Exception &) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.core", "SwEditShell::Redo(): exception caught: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.core", "SwEditShell::Redo()"); } Pop(bRestoreCursor ? PopMode::DeleteCurrent : PopMode::DeleteStack); @@ -216,8 +214,7 @@ void SwEditShell::Repeat(sal_uInt16 const nCount) ::sw::RepeatContext context(*GetDoc(), *GetCursor()); GetDoc()->GetIDocumentUndoRedo().Repeat( context, nCount ); } catch (const css::uno::Exception &) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.core", "SwEditShell::Repeat(): exception caught: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.core", "SwEditShell::Repeat()"); } EndAllAction(); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 0107c7a0d3ad..6651124711dc 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1431,8 +1431,7 @@ void DocxExport::WriteEmbeddings() } catch(const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.ww8", "WriteEmbeddings() ::Failed to copy Inputstream to outputstream exception caught! " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.ww8", "WriteEmbeddings() ::Failed to copy Inputstream to outputstream exception caught"); } xOutStream->closeOutput(); } diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index f82b4709c406..4f0c6a206f52 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -248,20 +248,17 @@ ErrCode ReadThroughComponent( } catch(const packages::zip::ZipIOException&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sw", "uno exception caught while importing" ); return ERRCODE_IO_BROKENPACKAGE; } catch(const io::IOException&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sw", "uno exception caught while importing" ); return ERR_SWG_READ_ERROR; } catch(const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) ); + TOOLS_WARN_EXCEPTION( "sw", "uno exception caught while importing" ); return ERR_SWG_READ_ERROR; } diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 47676abbacb0..b0a453d48443 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -345,8 +345,7 @@ SwXMLTextStyleContext_Impl::Finish( bool bOverwrite ) } catch (uno::Exception const&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.xml", "exception when setting ParaStyleConditions: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.xml", "exception when setting ParaStyleConditions"); } } XMLTextStyleContext::Finish( bOverwrite ); diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 5062ebb33117..f0d00352bbdd 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -302,8 +302,7 @@ public: } catch (const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.vba", "Got exception " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.vba", ""); } uno::Any aReturn; if ( rPropName == "LineCount" ) // special processing needed diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 5be3ddce23e5..6222a37c51ea 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2075,8 +2075,7 @@ OUString SwDBManager::GetDBField(uno::Reference<beans::XPropertySet> const & xCo } catch (const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.mailmerge", "exception caught: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.mailmerge", ""); } } @@ -3166,8 +3165,7 @@ void SwDBManager::InsertText(SwWrtShell& rSh, } catch (const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.mailmerge", "exception caught: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.mailmerge", ""); } } } @@ -3185,8 +3183,7 @@ uno::Reference<sdbc::XDataSource> SwDBManager::getDataSourceAsParent(const uno:: } catch (const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.mailmerge", "exception caught in getDataSourceAsParent(): " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.mailmerge", "getDataSourceAsParent()"); } return xSource; } @@ -3226,8 +3223,7 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat } catch (const uno::Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.mailmerge", "Caught exception while creating a new RowSet: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.mailmerge", "Caught exception while creating a new RowSet"); } return xResultSet; } diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index ba235222bccf..44ca78548510 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -871,8 +871,7 @@ Reference< XResultSet> const & SwMailMergeConfigItem::GetResultSet() const } catch (const Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.ui", "exception caught: " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.ui", ""); } xRowSet->execute(); m_pImpl->m_xResultSet = xRowSet.get(); @@ -881,8 +880,7 @@ Reference< XResultSet> const & SwMailMergeConfigItem::GetResultSet() const } catch (const Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.ui", "exception caught in: SwMailMergeConfigItem::GetResultSet() " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.ui", "SwMailMergeConfigItem::GetResultSet()"); } } return m_pImpl->m_xResultSet; @@ -920,8 +918,7 @@ void SwMailMergeConfigItem::SetFilter(OUString const & rFilter) } catch (const Exception&) { - css::uno::Any ex( cppu::getCaughtException() ); - SAL_WARN("sw.ui", "exception caught in SwMailMergeConfigItem::SetFilter(): " << exceptionToString(ex)); + TOOLS_WARN_EXCEPTION("sw.ui", "SwMailMergeConfigItem::SetFilter()"); } } } |