summaryrefslogtreecommitdiff
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
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>
-rw-r--r--avmedia/source/framework/mediaitem.cxx6
-rw-r--r--basctl/source/basicide/scriptdocument.cxx5
-rw-r--r--basic/source/classes/sbxmod.cxx4
-rw-r--r--basic/source/runtime/runtime.cxx4
-rw-r--r--chart2/source/tools/ErrorBar.cxx9
-rw-r--r--connectivity/Library_dbpool2.mk1
-rw-r--r--connectivity/source/commontools/parameters.cxx21
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx4
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx4
-rw-r--r--cui/source/customize/CommandCategoryListBox.cxx6
-rw-r--r--cui/source/customize/cfg.cxx46
-rw-r--r--cui/source/dialogs/scriptdlg.cxx21
-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
-rw-r--r--dbaccess/source/core/api/RowSet.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx3
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx5
-rw-r--r--desktop/source/app/app.cxx7
-rw-r--r--desktop/source/app/check_ext_deps.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx11
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx6
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx16
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx2
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx6
-rw-r--r--editeng/source/xml/xmltxtexp.cxx6
-rw-r--r--extensions/CppunitTest_extensions_test_update.mk1
-rw-r--r--extensions/Library_updchk.mk1
-rw-r--r--extensions/source/bibliography/datman.cxx5
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx4
-rw-r--r--extensions/source/propctrlr/eformspropertyhandler.cxx4
-rw-r--r--extensions/source/update/check/updatecheck.cxx11
-rw-r--r--extensions/source/update/check/updatecheckjob.cxx11
-rw-r--r--extensions/source/update/feed/test/updatefeedtest.cxx4
-rw-r--r--filter/Library_icg.mk3
-rw-r--r--filter/source/graphicfilter/icgm/cgm.cxx6
-rw-r--r--filter/source/odfflatxml/OdfFlatXml.cxx6
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx6
-rw-r--r--forms/source/component/ListBox.cxx3
-rw-r--r--forms/source/misc/InterfaceContainer.cxx3
-rw-r--r--formula/source/ui/dlg/formula.cxx10
-rw-r--r--include/o3tl/deleter.hxx4
-rw-r--r--include/toolkit/helper/macros.hxx15
-rw-r--r--io/Library_io.mk1
-rw-r--r--io/source/stm/opump.cxx27
-rw-r--r--javaunohelper/Library_juhx.mk1
-rw-r--r--javaunohelper/source/bootstrap.cxx7
-rw-r--r--linguistic/source/convdiclist.cxx4
-rw-r--r--linguistic/source/gciterator.cxx11
-rw-r--r--oox/source/drawingml/textfield.cxx4
-rw-r--r--oox/source/drawingml/textrun.cxx4
-rw-r--r--oox/source/ole/axcontrol.cxx11
-rw-r--r--oox/source/vml/vmldrawing.cxx5
-rw-r--r--sax/Library_expwrap.mk1
-rw-r--r--sax/source/fastparser/fastparser.cxx4
-rw-r--r--sc/source/core/data/dpsave.cxx7
-rw-r--r--sc/source/filter/oox/excelfilter.cxx6
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx11
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx22
-rw-r--r--sc/source/ui/Accessibility/DrawModelBroadcaster.cxx6
-rw-r--r--sd/source/core/stlsheet.cxx6
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx25
-rw-r--r--sd/source/helper/simplereferencecomponent.cxx6
-rw-r--r--sd/source/ui/accessibility/AccessiblePageShape.cxx4
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx36
-rw-r--r--sd/source/ui/framework/module/ModuleController.cxx3
-rw-r--r--sd/source/ui/tools/ConfigurationAccess.cxx5
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx6
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx6
-rw-r--r--sdext/source/minimizer/configurationaccess.cxx6
-rw-r--r--sdext/source/presenter/PresenterConfigurationAccess.cxx5
-rw-r--r--sdext/source/presenter/PresenterTextView.cxx4
-rw-r--r--sfx2/source/appl/appdde.cxx15
-rw-r--r--sfx2/source/appl/appserv.cxx3
-rw-r--r--sfx2/source/appl/newhelp.cxx26
-rw-r--r--sfx2/source/appl/sfxhelp.cxx7
-rw-r--r--sfx2/source/bastyp/helper.cxx23
-rw-r--r--sfx2/source/dialog/backingwindow.cxx6
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx11
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx13
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx4
-rw-r--r--sfx2/source/doc/docfile.cxx10
-rw-r--r--sfx2/source/doc/doctempl.cxx4
-rw-r--r--sfx2/source/doc/doctemplates.cxx9
-rw-r--r--solenv/bin/macosx-change-install-names.pl1
-rw-r--r--svl/source/config/itemholder2.cxx6
-rw-r--r--svtools/source/contnr/contentenumeration.cxx11
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx4
-rw-r--r--svx/source/form/datanavi.cxx281
-rw-r--r--svx/source/svdraw/svdmodel.cxx6
-rw-r--r--svx/source/svdraw/svdomedia.cxx6
-rw-r--r--svx/source/tbxctrls/tbxcolor.cxx6
-rw-r--r--sw/source/core/access/accmap.cxx6
-rw-r--r--sw/source/core/edit/edundo.cxx16
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/xml/swxml.cxx24
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx7
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx4
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx21
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx16
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx6
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx9
-rw-r--r--toolkit/source/helper/listenermultiplexer.cxx5
-rw-r--r--ucb/Library_ucpexpand1.mk1
-rw-r--r--ucb/source/core/ucbstore.cxx4
-rw-r--r--ucb/source/ucp/expand/ucpexpand.cxx6
-rw-r--r--unotools/source/config/itemholder1.cxx6
-rw-r--r--unotools/source/config/viewoptions.cxx74
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx5
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx10
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx3
-rw-r--r--xmloff/source/draw/shapeexport.cxx3
-rw-r--r--xmloff/source/table/XMLTableExport.cxx13
-rw-r--r--xmloff/source/table/XMLTableImport.cxx9
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx4
121 files changed, 795 insertions, 526 deletions
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 0fca80f6d5b4..9a1a33ea5473 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -39,6 +39,7 @@
#include <comphelper/storagehelper.hxx>
#include <mediamisc.hxx>
#include <osl/file.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -506,9 +507,10 @@ bool CreateMediaTempFile(uno::Reference<io::XInputStream> const& xInStream,
comphelper::getProcessComponentContext());
tempContent.writeStream(xInStream, true); // copy stream to file
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
- SAL_WARN("avmedia", "exception: '" << e << "'");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("avmedia", "exception: " << exceptionToString(ex));
return false;
}
o_rTempFileURL = tempFileURL;
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 9f4a919632f4..e6daf0ca6dfc 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -408,9 +408,10 @@ namespace basctl
return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument );
}
- catch (const css::ucb::ContentCreationException& e)
+ catch (const css::ucb::ContentCreationException&)
{
- SAL_WARN( "basctl.basicide", "ScriptDocument::getBasicManager: Caught exception: " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "basctl.basicide", "ScriptDocument::getBasicManager: Caught exception: " << exceptionToString(ex) );
}
return nullptr;
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 23a279485afa..7e65e2e588a2 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -20,6 +20,7 @@
#include <vcl/svapp.hxx>
#include <tools/stream.hxx>
+#include <tools/diagnose_ex.h>
#include <svl/SfxBroadcaster.hxx>
#include <basic/sbx.hxx>
#include <basic/sbuno.hxx>
@@ -145,7 +146,8 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar )
}
catch(const Exception& )
{
- SAL_WARN( "basic", "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "basic", "DocObjectWrapper::DocObjectWrapper: Caught exception! " << exceptionToString(ex) );
}
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index ea0d9ae69379..0e1ace2e349b 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -36,6 +36,7 @@
#include <sal/log.hxx>
#include <tools/wldcrd.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -343,7 +344,8 @@ SbiInstance::~SbiInstance()
}
catch( const Exception& )
{
- SAL_WARN("basic", "SbiInstance::~SbiInstance: caught an exception while disposing the components!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("basic", "SbiInstance::~SbiInstance: caught an exception while disposing the components! " << exceptionToString(ex) );
}
}
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 8cb31099d166..04512746c8d6 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -209,11 +209,18 @@ OUString getSourceRangeStrFromLabeledSequences( const uno::Sequence< uno::Refere
}
}
}
+ catch (uno::Exception const &)
+ {
+ css::uno::Any ex( cppu::getCaughtException() );
+ // we can't be sure that this is 100% safe and we don't want to kill the export
+ // we should at least check why the exception is thrown
+ SAL_WARN("chart2", "unexpected exception! " << exceptionToString(ex));
+ }
catch (...)
{
// we can't be sure that this is 100% safe and we don't want to kill the export
// we should at least check why the exception is thrown
- SAL_WARN("chart2", "unexpected exception!");
+ SAL_WARN("chart2", "unexpected exception! ");
}
}
diff --git a/connectivity/Library_dbpool2.mk b/connectivity/Library_dbpool2.mk
index 0e1d1fc19a3f..38b3cd197f01 100644
--- a/connectivity/Library_dbpool2.mk
+++ b/connectivity/Library_dbpool2.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Library_use_libraries,dbpool2,\
dbtools \
sal \
salhelper \
+ tl \
))
$(eval $(call gb_Library_add_exception_objects,dbpool2,\
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index e03c6064c7cf..8ab930dc2d3f 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -197,7 +197,8 @@ namespace dbtools
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.commontools", "ParameterManager::collectInnerParameters: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.commontools", "ParameterManager::collectInnerParameters: caught an exception! " << exceptionToString(ex) );
}
}
}
@@ -426,7 +427,8 @@ namespace dbtools
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.commontools", "ParameterManager::analyzeFieldLinks: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.commontools", "ParameterManager::analyzeFieldLinks: caught an exception! " << exceptionToString(ex) );
}
}
@@ -664,7 +666,8 @@ namespace dbtools
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while calling the handler!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while calling the handler! " << exceptionToString(ex) );
}
if ( !pParams->wasSelected() )
@@ -694,7 +697,8 @@ namespace dbtools
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while propagating the values!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.commontools", "ParameterManager::completeParameters: caught an exception while propagating the values! " << exceptionToString(ex) );
}
return true;
}
@@ -788,7 +792,8 @@ namespace dbtools
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.commontools", "ParameterManager::cacheConnectionInfo: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.commontools", "ParameterManager::cacheConnectionInfo: caught an exception! " << exceptionToString(ex) );
}
}
@@ -844,7 +849,8 @@ namespace dbtools
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.commontools", "ParameterManager::getParentColumns: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.commontools", "ParameterManager::getParentColumns: caught an exception! " << exceptionToString(ex) );
}
return _out_rxParentColumns.is();
}
@@ -940,7 +946,8 @@ namespace dbtools
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.commontools", "ParameterManager::resetParameterValues: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.commontools", "ParameterManager::resetParameterValues: caught an exception! " << exceptionToString(ex) );
}
}
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 3318e89c7d91..86393c6319ce 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -364,7 +365,8 @@ Reference<XInterface> OPoolCollection::openNode(const OUString& _rPath,const Ref
}
catch(Exception&)
{
- SAL_WARN("connectivity.cpool", "OConfigurationNode::openNode: caught an exception while retrieving the node!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("connectivity.cpool", "OConfigurationNode::openNode: caught an exception while retrieving the node! " << exceptionToString(ex));
}
return xNode;
}
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index ac234f608016..500a3034ec94 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -32,6 +32,7 @@
#include <file/FDriver.hxx>
#include <file/FTable.hxx>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
#include <ucbhelper/content.hxx>
using namespace com::sun::star::ucb;
@@ -147,7 +148,8 @@ namespace
}
catch( const Exception& )
{
- SAL_WARN( "connectivity.drivers", "isCaseSensitiveParentFolder: caught an unexpected exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "connectivity.drivers", "isCaseSensitiveParentFolder: caught an unexpected exception! " << exceptionToString(ex) );
}
return nIsCS;
diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx
index 3908896763b4..7b50dd9a8719 100644
--- a/cui/source/customize/CommandCategoryListBox.cxx
+++ b/cui/source/customize/CommandCategoryListBox.cxx
@@ -35,6 +35,7 @@
// include search util
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/util/SearchAlgorithms2.hpp>
+#include <tools/diagnose_ex.h>
#include <unotools/textsearch.hxx>
#include <dialmgr.hxx>
@@ -331,9 +332,10 @@ void CommandCategoryListBox::categorySelected( const VclPtr<SfxConfigFunctionLi
= css::script::browse::theBrowseNodeFactory::get( m_xContext );
rootNode.set( xFac->createView( css::script::browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
}
- catch( css::uno::Exception& e )
+ catch( css::uno::Exception const & )
{
- SAL_WARN("cui.customize", "Caught some exception whilst retrieving browse nodes from factory... Exception: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.customize", "Caught some exception whilst retrieving browse nodes from factory... Exception: " << exceptionToString(ex));
// TODO exception handling
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 0fd8d4ac7257..d830b2ef8f7e 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -590,17 +590,10 @@ bool MenuSaveInData::Apply()
m_aMenuResourceURL, m_xMenuSettings );
}
}
- catch ( container::NoSuchElementException& )
- {
- SAL_WARN("cui.customize", "caught container::NoSuchElementException saving settings");
- }
- catch ( css::io::IOException& )
- {
- SAL_WARN("cui.customize", "caught IOException saving settings");
- }
catch ( css::uno::Exception& )
{
- SAL_WARN("cui.customize", "caught some other exception saving settings");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.customize", "caught some other exception saving settings " << exceptionToString(ex));
}
SetModified( false );
@@ -2604,17 +2597,10 @@ void ToolbarSaveInData::ApplyToolbar( SvxConfigEntry* pToolbar )
pToolbar->SetParentData( false );
}
}
- catch ( container::NoSuchElementException& )
- {
- SAL_WARN("cui.customize", "caught container::NoSuchElementException saving settings");
- }
- catch ( css::io::IOException& )
+ catch ( css::uno::Exception const & )
{
- SAL_WARN("cui.customize", "caught IOException saving settings");
- }
- catch ( css::uno::Exception& )
- {
- SAL_WARN("cui.customize", "caught some other exception saving settings");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.customize", "caught exception saving settings " << exceptionToString(ex));
}
PersistChanges( GetConfigManager() );
@@ -2637,21 +2623,10 @@ void ToolbarSaveInData::CreateToolbar( SvxConfigEntry* pToolbar )
{
GetConfigManager()->insertSettings( pToolbar->GetCommand(), xSettings );
}
- catch ( container::ElementExistException& )
- {
- SAL_WARN("cui.customize", "caught ElementExistsException saving settings");
- }
- catch ( css::lang::IllegalArgumentException& )
- {
- SAL_WARN("cui.customize", "caught IOException saving settings");
- }
- catch ( css::lang::IllegalAccessException& )
- {
- SAL_WARN("cui.customize", "caught IOException saving settings");
- }
- catch ( css::uno::Exception& )
+ catch ( css::uno::Exception const & )
{
- SAL_WARN("cui.customize", "caught some other exception saving settings");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.customize", "caught exception saving settings " << exceptionToString(ex));
}
GetEntries()->push_back( pToolbar );
@@ -3363,9 +3338,10 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
SAL_WARN("cui.customize", "could not get query XGraphic");
}
}
- catch( uno::Exception& e )
+ catch( uno::Exception const & )
{
- SAL_WARN("cui.customize", "Caught exception importing XGraphic: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.customize", "Caught exception importing XGraphic: " << exceptionToString(ex));
}
return result;
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 83724a28d461..2de38a07edc4 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -55,6 +55,7 @@
#include <svtools/imagemgr.hxx>
#include <vcl/treelistentry.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <vector>
#include <algorithm>
@@ -659,9 +660,10 @@ IMPL_LINK(SvxScriptOrgDialog, ButtonHdl, weld::Button&, rButton, void)
// ISSUE need code to run script here
xInv->invoke( "Editable", args, outIndex, outArgs );
}
- catch( Exception& e )
+ catch( Exception const & )
{
- SAL_WARN("cui.dialogs", "Caught exception trying to invoke " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.dialogs", "Caught exception trying to invoke " << exceptionToString(ex) );
}
}
}
@@ -828,9 +830,10 @@ void SvxScriptOrgDialog::createEntry(weld::TreeIter& rEntry)
aChildNode = newNode;
}
- catch( Exception& e )
+ catch( Exception const & )
{
- SAL_WARN("cui.dialogs", "Caught exception trying to Create " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.dialogs", "Caught exception trying to Create " << exceptionToString(ex) );
}
}
if ( aChildNode.is() )
@@ -912,9 +915,10 @@ void SvxScriptOrgDialog::renameEntry(weld::TreeIter& rEntry)
aChildNode = newNode;
}
- catch( Exception& e )
+ catch( Exception const & )
{
- SAL_WARN("cui.dialogs", "Caught exception trying to Rename " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.dialogs", "Caught exception trying to Rename " << exceptionToString(ex) );
}
}
if ( aChildNode.is() )
@@ -961,9 +965,10 @@ void SvxScriptOrgDialog::deleteEntry(weld::TreeIter& rEntry)
aResult = xInv->invoke( "Deletable", args, outIndex, outArgs );
aResult >>= result; // or do we just assume true if no exception ?
}
- catch( Exception& e )
+ catch( Exception const & )
{
- SAL_WARN("cui.dialogs", "Caught exception trying to delete " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("cui.dialogs", "Caught exception trying to delete " << exceptionToString(ex) );
}
}
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;
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 5cff9d646dfb..ceb274021843 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1472,9 +1472,10 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
{
throw;
}
- catch(Exception&)
+ catch(Exception const &)
{
- SAL_WARN("dbaccess", "ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("dbaccess", "ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters! " << exceptionToString(ex));
}
// we're done with the parameters, now for the real execution
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 37cec2057799..ad3713a1f43e 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1671,9 +1671,10 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
{
xProp->setPropertyValue("Version" , uno::makeAny(aVersion));
}
- catch (const uno::Exception& e)
+ catch (const uno::Exception&)
{
- SAL_WARN("dbaccess", "exception setting Version: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("dbaccess", "exception setting Version: " << exceptionToString(ex));
}
}
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index ead7061ab4b8..f6a3decb4db1 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -691,7 +691,8 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
}
catch( const Exception& )
{
- SAL_WARN("dbaccess", "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("dbaccess", "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error! " << exceptionToString(ex) );
}
if ( !xDriver.is() || !xDriver->acceptsURL( m_pImpl->m_sConnectURL ) )
{
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 25049a904e08..47e5c9933a4b 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -203,7 +203,10 @@ SQLExceptionInfo createConnection( const Reference< css::beans::XPropertySet>&
catch(const SQLContext& e) { aInfo = SQLExceptionInfo(e); }
catch(const SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
catch(const SQLException& e) { aInfo = SQLExceptionInfo(e); }
- catch(const Exception&) { SAL_WARN("dbaccess.ui", "SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
+ catch(const Exception&) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("dbaccess.ui", "SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception! " << exceptionToString(ex));
+ }
return aInfo;
}
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 206d7b096a8a..d2fb9463141f 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -118,13 +118,13 @@
#include <basic/sbstar.hxx>
#include <desktop/crashreport.hxx>
#include <tools/urlobj.hxx>
-
+#include <tools/diagnose_ex.h>
#include <svtools/fontsubstconfig.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <svtools/apearcfg.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/window.hxx>
-
+#include <tools/diagnose_ex.h>
#include "langselect.hxx"
#if HAVE_FEATURE_BREAKPAD
@@ -2502,7 +2502,8 @@ IMPL_STATIC_LINK_NOARG(Desktop, AsyncInitFirstRun, Timer *, void)
}
catch(const css::uno::Exception&)
{
- SAL_WARN( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ... " << exceptionToString(ex) );
}
}
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 15995d99bd64..6fb85c4a685a 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -31,6 +31,7 @@
#include <vcl/timer.hxx>
#include <unotools/configmgr.hxx>
+#include <tools/diagnose_ex.h>
#include <toolkit/helper/vclunohelper.hxx>
#include <comphelper/lok.hxx>
@@ -293,8 +294,9 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
bRegistered = false;
}
catch ( const uno::RuntimeException & ) { throw; }
- catch (const uno::Exception & exc) {
- SAL_WARN( "desktop.app", exc );
+ catch (const uno::Exception & ) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "desktop.app", exceptionToString(ex) );
}
if ( bRegistered )
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index f38b261882e3..eaab2ff54e72 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -56,6 +56,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
#include <ucbhelper/content.hxx>
#include <unotools/collatorwrapper.hxx>
#include <unotools/configmgr.hxx>
@@ -738,9 +739,10 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
{
xFilePicker->appendFilter( elem.first, elem.second );
}
- catch (const lang::IllegalArgumentException & exc)
+ catch (const lang::IllegalArgumentException &)
{
- SAL_WARN( "desktop", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "desktop", exceptionToString(ex) );
}
}
xFilePicker->setCurrentFilter( sDefaultFilter );
@@ -1388,8 +1390,9 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
bRegistered = false;
}
catch ( const uno::RuntimeException & ) { throw; }
- catch (const uno::Exception & exc) {
- SAL_WARN( "desktop", exc );
+ catch (const uno::Exception & ) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "desktop", exceptionToString(ex) );
bRegistered = false;
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index f64538a3c64b..2f74f256e68a 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -33,6 +33,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include "dp_gui_dialog2.hxx"
#include "dp_gui_extensioncmdqueue.hxx"
@@ -334,8 +335,9 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
catch ( const uno::RuntimeException & ) {
throw;
}
- catch (const uno::Exception & exc) {
- SAL_WARN( "desktop", exc );
+ catch (const uno::Exception &) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "desktop", exceptionToString(ex) );
return NOT_AVAILABLE;
}
}
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index f73eeb2268b2..12098a26a733 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -33,6 +33,7 @@
#include <rtl/bootstrap.hxx>
#include <sal/log.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
#include <osl/file.hxx>
#include <osl/security.hxx>
@@ -597,10 +598,11 @@ OUString PackageManagerImpl::detectMediaType(
if (xPackageType.is())
mediaType = xPackageType->getMediaType();
}
- catch (const lang::IllegalArgumentException & exc) {
+ catch (const lang::IllegalArgumentException &) {
if (throw_exc)
throw;
- SAL_WARN( "desktop", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "desktop", exceptionToString(ex) );
}
}
return mediaType;
@@ -1037,13 +1039,15 @@ PackageManagerImpl::getDeployedPackages_(
true /* xxx todo: think of GUI:
ignore other platforms than the current one */ ) );
}
- catch (const lang::IllegalArgumentException & exc) {
+ catch (const lang::IllegalArgumentException &) {
+ css::uno::Any ex( cppu::getCaughtException() );
// ignore
- SAL_WARN( "desktop", exc );
+ SAL_WARN( "desktop", exceptionToString(ex) );
}
- catch (const deployment::DeploymentException& exc) {
+ catch (const deployment::DeploymentException&) {
+ css::uno::Any ex( cppu::getCaughtException() );
// ignore
- SAL_WARN( "desktop", exc );
+ SAL_WARN( "desktop", exceptionToString(ex) );
}
}
return comphelper::containerToSequence(packages);
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 380de3eb28cd..5e16ef6b862a 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1058,7 +1058,7 @@ void BackendImpl::PackageImpl::exportTo(
SAL_WARN( "desktop", exceptionToString( cppu::getCaughtException() ) );
}
catch (const lang::IllegalArgumentException & exc) {
- SAL_WARN( "desktop", exc );
+ SAL_WARN( "desktop", exceptionToString(Any(exc)) );
}
std::vector< Sequence<beans::PropertyValue> > manifest;
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a24a12c99647..6e254d961331 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -133,6 +133,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <vcl/builder.hxx>
#include <vcl/abstdlg.hxx>
+#include <tools/diagnose_ex.h>
#include <app.hxx>
@@ -2800,9 +2801,10 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
}
catch (const uno::Exception& exception)
{
+ css::uno::Any exAny( cppu::getCaughtException() );
if (gImpl)
gImpl->maLastExceptionMsg = exception.Message;
- SAL_WARN("lok", "Failed to render shape selection: " << exception);
+ SAL_WARN("lok", "Failed to render shape selection: " << exceptionToString(exAny));
}
return 0;
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 2cb0ebf0dec3..c17e2ccbb9d1 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -27,6 +27,7 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <comphelper/anytostring.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/configmgr.hxx>
#include <com/sun/star/lang/WrappedTargetException.hpp>
#include <com/sun/star/task/XInteractionAbort.hpp>
@@ -120,8 +121,9 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
if (xComp.is())
xComp->dispose();
}
- catch (const RuntimeException & exc) {
- SAL_WARN( "desktop", exc );
+ catch (const RuntimeException &) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "desktop", exceptionToString(ex) );
}
}
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 0ce287d2a6e4..3a3490ba82b5 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -38,6 +38,7 @@
#include <xmloff/xmlmetae.hxx>
#include <cppuhelper/implbase4.hxx>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/streamwrap.hxx>
#include <xmloff/xmlexp.hxx>
#include <editeng/unoedsrc.hxx>
@@ -336,9 +337,10 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
}
while( false );
}
- catch( const uno::Exception& e )
+ catch( const uno::Exception& )
{
- SAL_WARN("editeng", "exception during xml export: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("editeng", "exception during xml export: " << exceptionToString(ex));
}
}
diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk
index e2cdaf58c315..02876aab74d5 100644
--- a/extensions/CppunitTest_extensions_test_update.mk
+++ b/extensions/CppunitTest_extensions_test_update.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,extensions_test_update, \
sal \
salhelper \
test \
+ tl \
utl \
unotest \
vcl \
diff --git a/extensions/Library_updchk.mk b/extensions/Library_updchk.mk
index 269a0d4dd36b..c7f1a54bb65e 100644
--- a/extensions/Library_updchk.mk
+++ b/extensions/Library_updchk.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_Library_use_libraries,updchk,\
cppu \
sal \
salhelper \
+ tl \
utl \
vcl \
))
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 8f456b889181..af0430e09352 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -174,9 +174,10 @@ static Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm)
if (xSupplyCols.is())
xReturn = xSupplyCols->getColumns();
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN( "extensions.biblio", "::getColumns : caught an exception. " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "extensions.biblio", "::getColumns : caught an exception. " << exceptionToString(ex));
}
}
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 44006083ee29..491eda019fa1 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/form/ListSourceType.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <connectivity/dbtools.hxx>
#include <helpids.h>
#include <sal/log.hxx>
@@ -253,7 +254,8 @@ namespace dbp
}
catch(const Exception&)
{
- SAL_WARN( "extensions.dbpilots", "OLinkFieldsPage::initializePage: caught an exception while retrieving the columns!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "extensions.dbpilots", "OLinkFieldsPage::initializePage: caught an exception while retrieving the columns! " << exceptionToString(ex));
}
}
return aColumnNames;
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index d074a7e64fed..31ca06be7121 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/inspection/PropertyControlType.hpp>
#include <com/sun/star/inspection/XObjectInspectorUI.hpp>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
#include <functional>
@@ -147,8 +148,9 @@ namespace pcr
}
catch( const Exception& )
{
+ css::uno::Any ex( cppu::getCaughtException() );
SAL_WARN( "extensions.propctrlr", "EFormsPropertyHandler::getPropertyValue: caught an exception!"
- "\n(have been asked for the \"" <<_rPropertyName << "\" property.)");
+ "\n(have been asked for the \"" <<_rPropertyName << "\" property.) " << exceptionToString(ex));
}
return aReturn;
}
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 47ef6e18093e..4306e073e26b 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -40,6 +40,7 @@
#include <osl/file.hxx>
#include <sal/macros.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#ifdef _WIN32
#include <objbase.h>
@@ -523,9 +524,10 @@ UpdateCheckThread::run()
}
}
- catch(const uno::Exception& e) {
+ catch(const uno::Exception&) {
+ css::uno::Any ex( cppu::getCaughtException() );
// Silently catch all errors
- SAL_WARN("extensions.update", "Caught exception, thread terminated. " << e );
+ SAL_WARN("extensions.update", "Caught exception, thread terminated. " << exceptionToString(ex) );
}
}
@@ -538,9 +540,10 @@ ManualUpdateCheckThread::run()
runCheck( bExtensionsChecked );
m_aCondition.reset();
}
- catch(const uno::Exception& e) {
+ catch(const uno::Exception&) {
// Silently catch all errors
- SAL_WARN("extensions.update", "Caught exception, thread terminated. " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("extensions.update", "Caught exception, thread terminated. " << exceptionToString(ex) );
}
}
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index 3e86885fa621..298046485fde 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -29,6 +29,7 @@
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
@@ -132,9 +133,10 @@ void SAL_CALL InitUpdateCheckJobThread::run()
if ( m_bShowDialog )
aController->showDialog( true );
- } catch (const uno::Exception &e) {
+ } catch (const uno::Exception &) {
+ css::uno::Any ex( cppu::getCaughtException() );
// fdo#64962 - don't bring the app down on some unexpected exception.
- SAL_WARN("extensions.update", "Caught init update exception, thread terminated. " << e );
+ SAL_WARN("extensions.update", "Caught init update exception, thread terminated. " << exceptionToString(ex) );
}
}
@@ -235,9 +237,10 @@ void UpdateCheckJob::handleExtensionUpdates( const uno::Sequence< beans::NamedVa
aController->setUIState( UPDATESTATE_NO_UPDATE_AVAIL, true );
}
}
- catch( const uno::Exception& e )
+ catch( const uno::Exception& )
{
- SAL_WARN("extensions.update", "Caught exception, thread terminated. " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("extensions.update", "Caught exception, thread terminated. " << exceptionToString(ex));
}
}
diff --git a/extensions/source/update/feed/test/updatefeedtest.cxx b/extensions/source/update/feed/test/updatefeedtest.cxx
index e443cd1a9473..6e6c944fa70c 100644
--- a/extensions/source/update/feed/test/updatefeedtest.cxx
+++ b/extensions/source/update/feed/test/updatefeedtest.cxx
@@ -70,9 +70,9 @@ SAL_IMPLEMENT_MAIN()
uno::Sequence< uno::Reference< xml::dom::XElement > > theUpdateInfo =
rUpdateInformationProvider->getUpdateInformation( theURLs, aExtension );
}
- catch( const uno::Exception & e )
+ catch( const uno::Exception & )
{
- SAL_WARN("extensions.update", "exception caught: " << e);
+ SAL_WARN("extensions.update", "exception caught: " << exceptionToString(ex));
}
catch( ... )
{
diff --git a/filter/Library_icg.mk b/filter/Library_icg.mk
index 54d733358937..94949bb32904 100644
--- a/filter/Library_icg.mk
+++ b/filter/Library_icg.mk
@@ -24,7 +24,8 @@ $(eval $(call gb_Library_use_external,icg,boost_headers))
$(eval $(call gb_Library_use_sdk_api,icg))
$(eval $(call gb_Library_use_libraries,icg,\
- comphelper \
+ comphelper \
+ cppuhelper \
tk \
vcl \
utl \
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index ba775e98fed8..3004d346522e 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -29,6 +29,7 @@
#include "outact.hxx"
#include <memory>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -730,9 +731,10 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u
aXStatInd->end();
}
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("filter.icgm", exc);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("filter.icgm", exceptionToString(ex));
nStatus = 0;
}
}
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index db483ffef04b..d4931b1eb848 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XSeekable.hpp>
+#include <tools/diagnose_ex.h>
using namespace ::cppu;
using namespace ::osl;
@@ -152,9 +153,10 @@ OdfFlatXml::importer(
else
saxParser->parseStream(inputSource);
}
- catch (const Exception &exc)
+ catch (const Exception &)
{
- SAL_WARN("filter.odfflatxml", exc);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("filter.odfflatxml", exceptionToString(ex));
return false;
}
catch (const std::exception &exc)
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 3e5164e7af4d..bade0bdbac1a 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -28,6 +28,7 @@
#include <osl/conditn.hxx>
#include <rtl/strbuf.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
#include <comphelper/interaction.hxx>
@@ -400,10 +401,11 @@ namespace XSLT
m_tcontrol->terminate();
return !m_bError;
}
- catch( const Exception& exc)
+ catch( const Exception& )
{
+ css::uno::Any ex( cppu::getCaughtException() );
// something went wrong
- SAL_WARN("filter.xslt", exc);
+ SAL_WARN("filter.xslt", exceptionToString(ex));
return false;
}
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index e355a18ff24f..77e361b3bf13 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -604,7 +604,8 @@ namespace frm
}
catch( const Exception& )
{
- SAL_WARN( "forms.component", "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "forms.component", "OComboBoxModel::read: caught an exception while examining the aggregate's string item list! " << exceptionToString(ex) );
}
// Version
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index dd65163908e9..36756bdfeae2 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -1088,7 +1088,8 @@ void SAL_CALL OInterfaceContainer::insertByName(const OUString& _rName, const An
}
catch( const Exception& )
{
- SAL_WARN("forms.misc", "OInterfaceContainer::insertByName: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("forms.misc", "OInterfaceContainer::insertByName: caught an exception! " << exceptionToString(ex) );
}
implInsert( m_aItems.size(), xElementProps, true, aElementMetaData.get(), true );
}
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 19d41ee211d7..68120f6bbd51 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -520,9 +520,10 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
nOldTokPos = nTokPos;
} // while ( pIter != pEnd )
}
- catch ( const uno::Exception& e )
+ catch ( const uno::Exception& )
{
- SAL_WARN("formula.ui", "FormulaDlg_Impl::GetFunctionPos exception! " << e.Message);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("formula.ui", "FormulaDlg_Impl::GetFunctionPos exception! " << exceptionToString(ex));
}
return nFuncPos;
@@ -1018,9 +1019,10 @@ OUString FormulaDlg_Impl::RepairFormula(const OUString& aFormula)
}
}
- catch ( const uno::Exception& e )
+ catch ( const uno::Exception& )
{
- SAL_WARN("formula.ui", "FormulaDlg_Impl::RepairFormula exception! " << e.Message);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("formula.ui", "FormulaDlg_Impl::RepairFormula exception! " << exceptionToString(ex));
}
return aResult;
}
diff --git a/include/o3tl/deleter.hxx b/include/o3tl/deleter.hxx
index 4dce1d005f71..4e90ca5a61f6 100644
--- a/include/o3tl/deleter.hxx
+++ b/include/o3tl/deleter.hxx
@@ -28,9 +28,9 @@ template<typename T> struct default_delete
{
delete p;
}
- catch (const css::uno::Exception& e)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
+ SAL_WARN("vcl.app", "Fatal exception: " << exceptionToString(ex));
std::terminate();
}
catch (const std::exception& e)
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index d06988b18fde..cf50d53c15be 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -103,10 +103,11 @@ void ClassName::disposing( const css::lang::EventObject& ) \
#if OSL_DEBUG_LEVEL > 0
- #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
- SAL_WARN( "toolkit", #ClassName "::" #MethodName ": caught an exception! " << e);
+ #define DISPLAY_EXCEPTION( ClassName, MethodName ) \
+ css::uno::Any ex( cppu::getCaughtException() ); \
+ SAL_WARN( "toolkit", #ClassName "::" #MethodName ": caught an exception! " << exceptionToString(ex));
#else
- #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) (void)e;
+ #define DISPLAY_EXCEPTION( ClassName, MethodName )
#endif
#define IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( ClassName, InterfaceName, MethodName, ParamType1 ) \
@@ -127,9 +128,9 @@ void ClassName::disposing( const css::lang::EventObject& ) \
if ( e.Context == xListener || !e.Context.is() ) \
aIt.remove(); \
} \
- catch(const css::uno::RuntimeException& e) \
+ catch(const css::uno::RuntimeException&) \
{ \
- DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
+ DISPLAY_EXCEPTION( ClassName, MethodName ) \
} \
} \
}
@@ -153,9 +154,9 @@ void ClassName::disposing( const css::lang::EventObject& ) \
if ( e.Context == xListener || !e.Context.is() ) \
aIt.remove(); \
} \
- catch(const css::uno::RuntimeException& e) \
+ catch(const css::uno::RuntimeException&) \
{ \
- DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
+ DISPLAY_EXCEPTION( ClassName, MethodName ) \
} \
} \
}
diff --git a/io/Library_io.mk b/io/Library_io.mk
index c203daae2e78..8f85ca8b42a8 100644
--- a/io/Library_io.mk
+++ b/io/Library_io.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_Library_use_libraries,io,\
cppu \
cppuhelper \
sal \
+ tl \
))
$(eval $(call gb_Library_set_componentfile,io,io/source/io))
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index 0bcccef819ae..e1b4fe043d5c 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -41,7 +41,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <osl/mutex.hxx>
#include <osl/thread.h>
-
+#include <tools/diagnose_ex.h>
using namespace osl;
using namespace std;
@@ -132,9 +132,10 @@ void Pump::fireError( const Any & exception )
{
static_cast< XStreamListener * > ( iter.next() )->error( exception );
}
- catch ( const RuntimeException &e )
+ catch ( const RuntimeException & )
{
- SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
}
}
}
@@ -160,9 +161,10 @@ void Pump::fireClose()
{
static_cast< XStreamListener * > ( iter.next() )->closed( );
}
- catch ( const RuntimeException &e )
+ catch ( const RuntimeException & )
{
- SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
}
}
}
@@ -177,9 +179,10 @@ void Pump::fireStarted()
{
static_cast< XStreamListener * > ( iter.next() )->started( );
}
- catch ( const RuntimeException &e )
+ catch ( const RuntimeException & )
{
- SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
}
}
}
@@ -193,9 +196,10 @@ void Pump::fireTerminated()
{
static_cast< XStreamListener * > ( iter.next() )->terminated();
}
- catch ( const RuntimeException &e )
+ catch ( const RuntimeException & )
{
- SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
}
}
}
@@ -293,11 +297,12 @@ void Pump::run()
close();
fireClose();
}
- catch ( const css::uno::Exception &e )
+ catch ( const css::uno::Exception & )
{
// we are the last on the stack.
// this is to avoid crashing the program, when e.g. a bridge crashes
- SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << exceptionToString(ex));
}
}
diff --git a/javaunohelper/Library_juhx.mk b/javaunohelper/Library_juhx.mk
index 1a24e5ef54f2..6eacff250c0f 100644
--- a/javaunohelper/Library_juhx.mk
+++ b/javaunohelper/Library_juhx.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_Library_use_libraries,juhx,\
jvmaccess \
sal \
salhelper \
+ tl \
))
$(eval $(call gb_Library_add_exception_objects,juhx,\
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index cb927de74e9f..442dd00ef2c5 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -38,6 +38,7 @@
#include <jni.h>
#include <jvmaccess/virtualmachine.hxx>
#include <jvmaccess/unovirtualmachine.hxx>
+#include <tools/diagnose_ex.h>
#include "juhx-export-functions.hxx"
#include "vm.hxx"
@@ -148,10 +149,11 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
}
catch (const RuntimeException & exc)
{
+ css::uno::Any exAny( cppu::getCaughtException() );
jclass c = jni_env->FindClass( "com/sun/star/uno/RuntimeException" );
if (nullptr != c)
{
- SAL_WARN("javaunohelper", "forwarding RuntimeException: " << exc );
+ SAL_WARN("javaunohelper", "forwarding RuntimeException: " << exceptionToString(exAny) );
OString cstr( OUStringToOString(
exc.Message, RTL_TEXTENCODING_JAVA_UTF8 ) );
jni_env->ThrowNew( c, cstr.getStr() );
@@ -159,10 +161,11 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
}
catch (const Exception & exc)
{
+ css::uno::Any ex( cppu::getCaughtException() );
jclass c = jni_env->FindClass( "com/sun/star/uno/Exception" );
if (nullptr != c)
{
- SAL_WARN("javaunohelper", "forwarding Exception: " << exc );
+ SAL_WARN("javaunohelper", "forwarding Exception: " << exceptionToString(ex) );
OString cstr( OUStringToOString(
exc.Message, RTL_TEXTENCODING_JAVA_UTF8 ) );
jni_env->ThrowNew( c, cstr.getStr() );
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index c34d97adf07e..50f1799423d2 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -45,6 +45,7 @@
#include <unotools/lingucfg.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
+#include <tools/diagnose_ex.h>
#include "convdic.hxx"
#include "convdiclist.hxx"
@@ -271,7 +272,8 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
}
catch( ... )
{
- SAL_WARN( "linguistic", "HangulHanjaOptionsDialog::OkHdl(): Any other exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "linguistic", "HangulHanjaOptionsDialog::OkHdl(): Any other exception " << exceptionToString(ex) );
}
}
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 5d27876d6d57..325af32849bd 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -58,6 +58,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <deque>
#include <map>
@@ -936,10 +937,11 @@ void SAL_CALL GrammarCheckingIterator::processLinguServiceEvent(
{
throw;
}
- catch (const ::uno::Exception &rE)
+ catch (const ::uno::Exception &)
{
+ css::uno::Any ex( cppu::getCaughtException() );
// ignore
- SAL_WARN("linguistic", "processLinguServiceEvent: exception: " << rE);
+ SAL_WARN("linguistic", "processLinguServiceEvent: exception: " << exceptionToString(ex));
}
}
}
@@ -1099,9 +1101,10 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl()
}
}
}
- catch (uno::Exception &)
+ catch (uno::Exception const &)
{
- SAL_WARN( "linguistic", "exception caught. Failed to get configured services" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "linguistic", "exception caught. Failed to get configured services " << exceptionToString(ex) );
}
{
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index a3e2bf4948c6..713c5a745b3d 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -33,6 +33,7 @@
#include <oox/core/xmlfilterbase.hxx>
#include <drawingml/textparagraphproperties.hxx>
#include <drawingml/textcharacterproperties.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -234,7 +235,8 @@ sal_Int32 TextField::insertAt(
}
catch( const Exception& )
{
- SAL_WARN("oox", "OOX: TextField::insertAt() exception");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("oox", "OOX: TextField::insertAt() exception " << exceptionToString(ex));
}
return nCharHeight;
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 5bcdd262390b..9d80e0517816 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -32,6 +32,7 @@
#include <oox/core/xmlfilterbase.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
@@ -175,7 +176,8 @@ sal_Int32 TextRun::insertAt(
}
catch( const Exception& )
{
- SAL_WARN("oox", "OOX: TextRun::insertAt() exception");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("oox", "OOX: TextRun::insertAt() exception " << exceptionToString(ex));
}
return nCharHeight;
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 216cc1982816..2826ca06714e 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -62,6 +62,7 @@
#include <oox/ole/axbinarywriter.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
+#include <tools/diagnose_ex.h>
namespace oox {
namespace ole {
@@ -2742,9 +2743,10 @@ Reference< XControlModel > EmbeddedForm::convertAndInsert( const EmbeddedControl
rnCtrlIndex = xFormIC->getCount();
xFormIC->insertByIndex( rnCtrlIndex, Any( xFormComp ) );
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN("oox", "exception creating Control: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("oox", "exception creating Control: " << exceptionToString(ex));
}
return xRet;
}
@@ -2768,9 +2770,10 @@ Reference< XIndexContainer > const & EmbeddedForm::createXForm()
mxFormIC.set( xForm, UNO_QUERY_THROW );
}
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN("oox", "exception creating Form: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("oox", "exception creating Form: " << exceptionToString(ex));
}
// always clear the forms supplier to not try to create the form again
mxFormsSupp.clear();
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index 012ca342ae77..6fa26118f246 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -305,9 +305,10 @@ Reference< XShape > Drawing::createAndInsertXControlShape( const ::oox::ole::Emb
// set the control model at the shape
Reference< XControlShape >( xShape, UNO_QUERY_THROW )->setControl( xCtrlModel );
}
- catch (Exception const& e)
+ catch (Exception const&)
{
- SAL_WARN("oox", "exception inserting Shape: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("oox", "exception inserting Shape: " << exceptionToString(ex));
}
return xShape;
}
diff --git a/sax/Library_expwrap.mk b/sax/Library_expwrap.mk
index 076814aab0e8..17a91e4d5904 100644
--- a/sax/Library_expwrap.mk
+++ b/sax/Library_expwrap.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_use_libraries,expwrap,\
sal \
salhelper \
sax \
+ tl \
))
$(eval $(call gb_Library_add_exception_objects,expwrap,\
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 1e8b578e325f..6d888f2d1115 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -39,6 +39,7 @@
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <salhelper/thread.hxx>
+#include <tools/diagnose_ex.h>
#include <queue>
#include <memory>
@@ -610,8 +611,7 @@ void Entity::saveException( const Any & e )
// fdo#81214 - allow the parser to run on after an exception,
// unexpectedly some 'startElements' produce an UNO_QUERY_THROW
// for XComponent; and yet expect to continue parsing.
- SAL_WARN("sax", "Unexpected exception from XML parser "
- << e.get<Exception>());
+ SAL_WARN("sax", "Unexpected exception from XML parser " << exceptionToString(e));
osl::MutexGuard g(maSavedExceptionMutex);
if (maSavedException.hasValue())
{
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 1c2ab97f3a1e..5b9637d50607 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -42,7 +42,7 @@
#include <com/sun/star/sheet/XMembersSupplier.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-
+#include <tools/diagnose_ex.h>
#include <unordered_map>
#include <algorithm>
@@ -1142,9 +1142,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
SC_UNO_DP_ROWGRAND, static_cast<bool>(nRowGrandMode) );
}
}
- catch(uno::Exception&)
+ catch(uno::Exception const &)
{
- SAL_WARN("sc.core", "exception in WriteToSource");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.core", "exception in WriteToSource " << exceptionToString(ex));
}
}
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index 2546bf98ba46..b3ec268b0db9 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -38,6 +38,7 @@
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
namespace oox {
namespace xls {
@@ -94,9 +95,10 @@ bool ExcelFilter::importDocument()
{
importDocumentProperties();
}
- catch( const Exception& e )
+ catch( const Exception& )
{
- SAL_WARN("sc", "exception when importing document properties " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc", "exception when importing document properties " << exceptionToString(ex));
}
catch( ... )
{
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index 2adda9081355..a4f033510e6f 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -35,6 +35,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
+#include <tools/diagnose_ex.h>
#include <defnamesbuffer.hxx>
#include <pivotcachefragment.hxx>
#include <sheetdatabuffer.hxx>
@@ -734,9 +735,10 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
aAutoName = xGroupName->getName();
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown " << exceptionToString(ex) );
}
SAL_WARN_IF( aAutoName.isEmpty(), "sc", "PivotCacheField::createParentGroupField - cannot find auto-generated group name" );
@@ -762,9 +764,10 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
pName->maGroupName = aGroupName;
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown " << exceptionToString(ex) );
}
}
++nIndex;
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index a377239ccd11..8de761208428 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -58,6 +58,7 @@
#include <svx/xmleohlp.hxx>
#include <sal/log.hxx>
#include <unotools/saveopt.hxx>
+#include <tools/diagnose_ex.h>
#include <document.hxx>
#include <xmlwrap.hxx>
@@ -193,6 +194,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
}
catch( const xml::sax::SAXParseException& r )
{
+ css::uno::Any ex( cppu::getCaughtException() );
// sax parser sends wrapped exceptions,
// try to find the original one
xml::sax::SAXException aSaxEx = *static_cast<xml::sax::SAXException const *>(&r);
@@ -214,7 +216,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
nReturn = ERRCODE_SFX_WRONGPASSWORD;
else
{
- SAL_WARN("sc.filter", "SAX parse exception caught while importing: " << r);
+ SAL_WARN("sc.filter", "SAX parse exception caught while importing: " << exceptionToString(ex));
OUString sErr = OUString::number( r.LineNumber ) +
"," +
@@ -238,6 +240,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
}
catch( const xml::sax::SAXException& r )
{
+ css::uno::Any ex( cppu::getCaughtException() );
packages::zip::ZipIOException aBrokenPackage;
if ( r.WrappedException >>= aBrokenPackage )
return ERRCODE_IO_BROKENPACKAGE;
@@ -245,26 +248,29 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
nReturn = ERRCODE_SFX_WRONGPASSWORD;
else
{
- SAL_WARN("sc.filter", "SAX exception caught while importing: " << r);
+ SAL_WARN("sc.filter", "SAX exception caught while importing: " << exceptionToString(ex));
nReturn = SCERR_IMPORT_FORMAT;
}
}
- catch( const packages::zip::ZipIOException& r )
+ catch( const packages::zip::ZipIOException& )
{
- SAL_WARN("sc.filter", "Zip exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.filter", "Zip exception caught while importing: " << exceptionToString(ex));
nReturn = ERRCODE_IO_BROKENPACKAGE;
}
- catch( const io::IOException& r )
+ catch( const io::IOException& )
{
- SAL_WARN("sc.filter", "IO exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.filter", "IO exception caught while importing: " << exceptionToString(ex));
nReturn = SCERR_IMPORT_OPEN;
}
- catch( const uno::Exception& r )
+ catch( const uno::Exception& )
{
- SAL_WARN("sc.filter", "uno exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.filter", "uno exception caught while importing: " << exceptionToString(ex));
nReturn = SCERR_IMPORT_UNKNOWN;
}
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index 4d1b654d9049..61bf52b466f5 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -21,6 +21,7 @@
#include <sal/log.hxx>
#include <svx/svdmodel.hxx>
#include <svx/unomod.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -67,9 +68,10 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&,
{
xListener->notifyEvent( aEvent );
}
- catch( const uno::RuntimeException& r )
+ catch( const uno::RuntimeException& )
{
- SAL_WARN("sc.ui", "Runtime exception caught while notifying shape. : " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.ui", "Runtime exception caught while notifying shape. : " << exceptionToString(ex));
}
}
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 81b465775e8c..4e81c7304a5c 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -42,6 +42,7 @@
#include <svx/unoshprp.hxx>
#include <svx/unoshape.hxx>
#include <svx/svdpool.hxx>
+#include <tools/diagnose_ex.h>
#include <stlsheet.hxx>
#include <sdresid.hxx>
#include <sdpage.hxx>
@@ -700,9 +701,10 @@ void SAL_CALL SdStyleSheet::release( ) throw ()
{
dispose();
}
- catch (RuntimeException const& exc)
+ catch (RuntimeException const&)
{ // don't break throw ()
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
OSL_ASSERT( mrBHelper.bDisposed );
SdStyleSheetBase::release();
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 6c038cb5dac6..8609f758c46a 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -74,6 +74,7 @@
#include <strings.hrc>
#include <sfx2/frame.hxx>
+#include <tools/diagnose_ex.h>
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -227,6 +228,7 @@ ErrCode ReadThroughComponent(
}
catch (const xml::sax::SAXParseException& r)
{
+ css::uno::Any ex( cppu::getCaughtException() );
// sax parser sends wrapped exceptions,
// try to find the original one
xml::sax::SAXException aSaxEx = *static_cast<xml::sax::SAXException const *>(&r);
@@ -248,7 +250,7 @@ ErrCode ReadThroughComponent(
if( bEncrypted )
return ERRCODE_SFX_WRONGPASSWORD;
- SAL_WARN( "sd.filter", "SAX parse exception caught while importing:" << r);
+ SAL_WARN( "sd.filter", "SAX parse exception caught while importing: " << exceptionToString(ex));
OUString sErr( OUString::number( r.LineNumber ));
sErr += ",";
@@ -271,6 +273,7 @@ ErrCode ReadThroughComponent(
}
catch (const xml::sax::SAXException& r)
{
+ css::uno::Any ex( cppu::getCaughtException() );
packages::zip::ZipIOException aBrokenPackage;
if ( r.WrappedException >>= aBrokenPackage )
return ERRCODE_IO_BROKENPACKAGE;
@@ -278,22 +281,25 @@ ErrCode ReadThroughComponent(
if( bEncrypted )
return ERRCODE_SFX_WRONGPASSWORD;
- SAL_WARN( "sd.filter", "SAX exception caught while importing:" << r);
+ SAL_WARN( "sd.filter", "SAX exception caught while importing: " << exceptionToString(ex));
return SD_XML_READERROR;
}
- catch (const packages::zip::ZipIOException& r)
+ catch (const packages::zip::ZipIOException&)
{
- SAL_WARN( "sd.filter", "Zip exception caught while importing:" << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd.filter", "Zip exception caught while importing: " << exceptionToString(ex));
return ERRCODE_IO_BROKENPACKAGE;
}
- catch (const io::IOException& r)
+ catch (const io::IOException&)
{
- SAL_WARN( "sd.filter", "IO exception caught while importing:" << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd.filter", "IO exception caught while importing: " << exceptionToString(ex));
return SD_XML_READERROR;
}
- catch (const uno::Exception& r)
+ catch (const uno::Exception&)
{
- SAL_WARN( "sd.filter", "uno exception caught while importing:" << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd.filter", "uno exception caught while importing: " << exceptionToString(ex));
return SD_XML_READERROR;
}
@@ -716,7 +722,8 @@ bool SdXMLFilter::Import( ErrCode& nError )
}
catch (const Exception&)
{
- SAL_WARN( "sd.filter","sd::SdXMLFilter::Import(), exception during clearing of unused named items");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd.filter","sd::SdXMLFilter::Import(), exception during clearing of unused named items " << exceptionToString(ex));
}
}
diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx
index e47341b85ba3..23a1fe108c4a 100644
--- a/sd/source/helper/simplereferencecomponent.cxx
+++ b/sd/source/helper/simplereferencecomponent.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
using com::sun::star::uno::RuntimeException;
using sd::SimpleReferenceComponent;
@@ -51,9 +52,10 @@ void SimpleReferenceComponent::release()
{
Dispose();
}
- catch (RuntimeException & exc ) // don't break throw ()
+ catch (RuntimeException const &) // don't break throw ()
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx
index 21cf52790532..05d97557882f 100644
--- a/sd/source/ui/accessibility/AccessiblePageShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx
@@ -20,6 +20,7 @@
#include <AccessiblePageShape.hxx>
#include <svx/AccessibleShapeInfo.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/gen.hxx>
#include <sal/log.hxx>
@@ -201,7 +202,8 @@ sal_Int32 SAL_CALL AccessiblePageShape::getBackground()
}
catch (const css::beans::UnknownPropertyException&)
{
- SAL_WARN("sd", "caught exception due to unknown property");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sd", "caught exception due to unknown property " << exceptionToString(ex));
// Ignore exception and return default color.
}
return nColor;
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index bf03cd86b415..094aa8e1e97b 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -32,6 +32,7 @@
#include <svx/unoshape.hxx>
#include <svx/xfltrit.hxx>
#include <svx/xfillit.hxx>
+#include <tools/diagnose_ex.h>
#include <xmloff/autolayout.hxx>
#include "PhotoAlbumDialog.hxx"
@@ -166,9 +167,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
if (bCreateCaptions)
createCaption( aPageSize );
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
}
@@ -230,9 +232,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
{
xSlide->add(xShape);
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
@@ -277,9 +280,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
if(bCreateCaptions)
createCaption( aPageSize );
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
}
@@ -349,9 +353,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
{
xSlide->add(xShape);
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
if( !sUrl2.isEmpty() )
@@ -392,9 +397,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
{
xSlide->add(xShape);
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
if( !sUrl3.isEmpty() )
@@ -435,9 +441,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
{
xSlide->add(xShape);
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
if( !sUrl4.isEmpty() )
@@ -480,9 +487,10 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, weld::Button&, void)
if(bCreateCaptions)
createCaption( aPageSize );
}
- catch (const css::uno::Exception& exc)
+ catch (const css::uno::Exception&)
{
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
}
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index d827d282fd40..20ddc1cf1871 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -230,7 +230,8 @@ void SAL_CALL ModuleController::requestResource (const OUString& rsResourceURL)
}
catch (const Exception&)
{
- SAL_WARN("sd.fwk", "caught exception while creating factory.");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sd.fwk", "caught exception while creating factory. " << exceptionToString(ex));
}
// Remember that this factory has been instanced.
diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx
index b62a26d0c113..dcee221eee52 100644
--- a/sd/source/ui/tools/ConfigurationAccess.cxx
+++ b/sd/source/ui/tools/ConfigurationAccess.cxx
@@ -106,9 +106,10 @@ Any ConfigurationAccess::GetConfigurationNode (
return rxNode->getByHierarchicalName(sPathToNode);
}
}
- catch (const Exception& rException)
+ catch (const Exception&)
{
- SAL_WARN("sd", "caught exception while getting configuration node" << sPathToNode << ": " << rException);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sd", "caught exception while getting configuration node" << sPathToNode << ": " << exceptionToString(ex));
}
return Any();
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 2085e77b2d74..1acea57a3cb3 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -48,6 +48,7 @@
#include <vcl/svapp.hxx>
#include <vcl/EnumContext.hxx>
#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
+#include <tools/diagnose_ex.h>
#include <memory>
@@ -425,9 +426,10 @@ void DrawController::FireSwitchCurrentPage (SdPage* pNewCurrentPage) throw()
mpCurrentPage.reset(pNewCurrentPage);
}
- catch (const uno::Exception& e)
+ catch (const uno::Exception&)
{
- SAL_WARN("sd", "sd::SdUnoDrawView::FireSwitchCurrentPage(), exception caught: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sd", "sd::SdUnoDrawView::FireSwitchCurrentPage(), exception caught: " << exceptionToString(ex));
}
}
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index ca453c80d2b5..41cd4ad24a27 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -125,6 +125,7 @@
#include <drawinglayer/primitive2d/structuretagprimitive2d.hxx>
#include <sfx2/lokcharthelper.hxx>
+#include <tools/diagnose_ex.h>
#define TWIPS_PER_PIXEL 15
@@ -326,9 +327,10 @@ void SAL_CALL SdXImpressDocument::release() throw ( )
{
dispose();
}
- catch (const uno::RuntimeException& exc)
+ catch (const uno::RuntimeException&)
{ // don't break throw ()
- SAL_WARN( "sd", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sd", exceptionToString(ex) );
}
}
SfxBaseModel::release();
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index f0e16bd12461..a711610bc0aa 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -28,6 +28,7 @@
#include <comphelper/propertysequence.hxx>
#include <sal/macros.h>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -328,10 +329,11 @@ Reference< XInterface > ConfigurationAccess::GetConfigurationNode(
}
}
}
- catch (const Exception& rException)
+ catch (const Exception&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
SAL_WARN("sdext.minimizer", "caught exception while getting configuration node "
- << sPathToNode << " : " << rException);
+ << sPathToNode << " : " << exceptionToString(ex));
}
return xNode;
}
diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx
index f2c5569a4dec..58fc6a6d058f 100644
--- a/sdext/source/presenter/PresenterConfigurationAccess.cxx
+++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx
@@ -149,9 +149,10 @@ Any PresenterConfigurationAccess::GetConfigurationNode (
return rxNode->getByHierarchicalName(sPathToNode);
}
}
- catch (const Exception& rException)
+ catch (const Exception&)
{
- SAL_WARN("sdext.presenter", "caught exception while getting configuration node " << sPathToNode << " : " << rException);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sdext.presenter", "caught exception while getting configuration node " << sPathToNode << " : " << exceptionToString(ex));
}
return Any();
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index eb995dd935b3..59350c34f3fa 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/TextDirection.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -1061,7 +1062,8 @@ PresenterTextCaret::~PresenterTextCaret()
}
catch (uno::Exception const&)
{
- SAL_WARN("sdext.presenter", "unexpected exception in ~PresenterTextCaret");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sdext.presenter", "unexpected exception in ~PresenterTextCaret " << exceptionToString(ex));
}
}
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 261ef18a1fa3..ac556afa7f42 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -93,21 +93,10 @@ namespace
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
bRet = aCnt.isDocument();
}
- catch( const ucb::CommandAbortedException& )
- {
- SAL_INFO( "sfx.appl", "CommandAbortedException" );
- }
- catch( const ucb::IllegalIdentifierException& )
- {
- SAL_INFO( "sfx.appl", "IllegalIdentifierException" );
- }
- catch( const ucb::ContentCreationException& )
- {
- SAL_INFO( "sfx.appl", "IllegalIdentifierException" );
- }
catch( const uno::Exception& )
{
- SAL_WARN( "sfx.appl", "Any other exception" );
+ css::uno::Any ex = cppu::getCaughtException();
+ SAL_WARN( "sfx.appl", exceptionToString(ex) );
}
return bRet;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index c972a4bfd301..314a9587a69f 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1393,7 +1393,8 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
}
catch( const css::uno::Exception& )
{
- SAL_WARN( "sfx.appl", "SfxApplication::OfaExec_Impl(SID_MORE_DICTIONARIES): caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxApplication::OfaExec_Impl(SID_MORE_DICTIONARIES): caught an exception " << exceptionToString(ex) );
}
break;
}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index d4e774b1f775..1e643918361e 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -33,6 +33,7 @@
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <sfx2/strings.hrc>
#include <helpids.h>
@@ -2030,9 +2031,10 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox()
Any aAny = ConfigurationHelper::readRelativeKey( xConfiguration, sPath, KEY_UI_NAME );
aAny >>= sTemp;
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox(): unexpected exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::InitOnStartupBox(): unexpected exception " << exceptionToString(ex) );
}
sModuleName = sTemp;
}
@@ -2283,9 +2285,10 @@ IMPL_LINK( SfxHelpTextWindow_Impl, CheckHdl, Button*, pButton, void )
xConfiguration, PATH_OFFICE_FACTORIES + sCurrentFactory, KEY_HELP_ON_OPEN, makeAny( bChecked ) );
ConfigurationHelper::flush( xConfiguration );
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl(): unexpected exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::CheckHdl(): unexpected exception " << exceptionToString(ex) );
}
}
@@ -2439,9 +2442,10 @@ void SfxHelpTextWindow_Impl::GetFocus()
xWindow->setFocus();
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus(): unexpected exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::GetFocus(): unexpected exception " << exceptionToString(ex) );
}
}
@@ -2526,9 +2530,10 @@ void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const
}
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): unexpected exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): unexpected exception " << exceptionToString(ex) );
}
SAL_WARN_IF( !bSetOff, "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): set off failed" );
@@ -3098,9 +3103,10 @@ void SfxHelpWindow_Impl::CloseWindow()
xCloser->close( false );
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow(): caught an exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxHelpWindow_Impl::CloseWindow(): caught an exception " << exceptionToString(ex) );
}
}
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 80d521b39a47..f305c3a04ee6 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -83,6 +83,7 @@
#include <sfx2/frame.hxx>
#include <rtl/string.hxx>
#include <svtools/langtab.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
@@ -399,7 +400,8 @@ static OUString getCurrentModuleIdentifier_Impl()
}
catch (const Exception&)
{
- SAL_WARN( "sfx.appl", "SfxHelp::getCurrentModuleIdentifier_Impl(): exception of XModuleManager::identify()" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxHelp::getCurrentModuleIdentifier_Impl(): exception of XModuleManager::identify() " << exceptionToString(ex) );
}
}
@@ -480,7 +482,8 @@ OUString SfxHelp::GetHelpModuleName_Impl(const OUString& rHelpID)
}
catch (const Exception&)
{
- SAL_WARN( "sfx.appl", "SfxHelp::GetHelpModuleName_Impl(): exception of XNameAccess::getByName()" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.appl", "SfxHelp::GetHelpModuleName_Impl(): " << exceptionToString(ex) );
}
}
}
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 2cc201acface..6588834a3096 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -38,7 +38,7 @@
#include <unotools/localedatawrapper.hxx>
#include <rtl/strbuf.hxx>
#include <sal/log.hxx>
-
+#include <tools/diagnose_ex.h>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <tools/datetime.hxx>
@@ -76,13 +76,10 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL )
if ( xDynResultSet.is() )
xResultSet = xDynResultSet->getStaticResultSet();
}
- catch( const ucb::CommandAbortedException& )
- {
- SAL_WARN( "sfx.bastyp", "GetResultSet: CommandAbortedException" );
- }
catch( const uno::Exception& )
{
- SAL_WARN( "sfx.bastyp", "GetResultSet: Any other exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.bastyp", "GetResultSet: " << exceptionToString(ex) );
}
@@ -105,13 +102,10 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL )
aList.push_back( aRow );
}
}
- catch( const ucb::CommandAbortedException& )
- {
- SAL_WARN( "sfx.bastyp", "XContentAccess::next(): CommandAbortedException" );
- }
catch( const uno::Exception& )
{
- SAL_WARN( "sfx.bastyp", "XContentAccess::next(): Any other exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.bastyp", "XContentAccess::next(): " << exceptionToString(ex) );
}
}
}
@@ -251,13 +245,10 @@ sal_Int64 SfxContentHelper::GetSize( const OUString& rContent )
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
aCnt.getPropertyValue( "Size" ) >>= nSize;
}
- catch( const ucb::CommandAbortedException& )
- {
- SAL_WARN( "sfx.bastyp", "CommandAbortedException" );
- }
catch( const uno::Exception& )
{
- SAL_WARN( "sfx.bastyp", "Any other exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.bastyp", exceptionToString(ex) );
}
return nSize;
}
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 45dd2af33006..d3fad16db845 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -44,6 +44,7 @@
#include <comphelper/propertysequence.hxx>
#include <toolkit/awt/vclxmenu.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -130,9 +131,10 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
{
mxContext.set( ::comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN( "fwk", "BackingWindow - caught an exception! " << e );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "fwk", "BackingWindow - caught an exception! " << exceptionToString(ex) );
}
// 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 41087c90d276..4c243102653d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -76,6 +76,7 @@
#include <bitmaps.hlst>
#include <vcl/help.hxx>
#include <vcl/builderfactory.hxx>
+#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -413,15 +414,17 @@ void SfxDocumentInfoItem::UpdateDocumentInfo(
xContainer->addProperty( pProp->m_sName,
beans::PropertyAttribute::REMOVABLE, pProp->m_aValue );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while adding custom properties" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while adding custom properties " << exceptionToString(ex) );
}
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while removing custom properties" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.dialog", "SfxDocumentInfoItem::updateDocumentInfo(): exception while removing custom properties " << exceptionToString(ex) );
}
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 33c7ed012f40..aa3612581296 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -93,6 +93,7 @@
#include <rtl/strbuf.hxx>
#include <sal/log.hxx>
#include <comphelper/sequence.hxx>
+#include <tools/diagnose_ex.h>
#ifdef UNX
#include <errno.h>
@@ -486,7 +487,8 @@ void FileDialogHelper_Impl::updateExportButton()
}
catch( const IllegalArgumentException& )
{
- SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updateExportButton: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updateExportButton: caught an exception " << exceptionToString(ex) );
}
}
}
@@ -594,7 +596,8 @@ void FileDialogHelper_Impl::updatePreviewState( bool _bUpdatePreviewWindow )
}
catch( const Exception& )
{
- SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updatePreviewState: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::updatePreviewState: caught an exception " << exceptionToString(ex) );
}
}
@@ -1295,7 +1298,8 @@ sal_Int16 FileDialogHelper_Impl::implDoExecute()
}
catch( const Exception& )
{
- SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception " << exceptionToString(ex) );
}
}
@@ -1323,7 +1327,8 @@ void FileDialogHelper_Impl::implStartExecute()
}
catch( const Exception& )
{
- SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.dialog", "FileDialogHelper_Impl::implDoExecute: caught an exception " << exceptionToString(ex) );
}
}
}
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index d26a2cd384b0..af3e99c930fa 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -51,6 +51,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/XmlIdRegistry.hxx>
#include <sfx2/objsh.hxx>
+#include <tools/diagnose_ex.h>
#include <libxml/tree.h>
@@ -571,7 +572,8 @@ collectFilesFromStorage(uno::Reference<embed::XStorage> const& i_xStorage,
o_rFiles.insert(styles);
}
} catch (const uno::Exception &) {
- SAL_WARN("sfx", "collectFilesFromStorage: exception?");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sfx", "collectFilesFromStorage: " << exceptionToString(ex));
}
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 6efbb67e4270..817f76f33829 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -130,6 +130,7 @@
#include <officecfg/Office/Common.hxx>
#include <comphelper/propertysequence.hxx>
#include <vcl/weld.hxx>
+#include <tools/diagnose_ex.h>
#include <com/sun/star/io/WrongFormatException.hpp>
@@ -1311,7 +1312,8 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand( bool bLoading, bool b
}
catch ( const uno::Exception& )
{
- SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file " << exceptionToString(ex) );
}
return eResult;
}
@@ -1539,7 +1541,8 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand( bool bLoading, bool b
}
catch( const uno::Exception& )
{
- SAL_WARN( "sfx.doc", "Locking exception: high probability, that the content has not been created" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.doc", "Locking exception: high probability, that the content has not been created " << exceptionToString(ex) );
}
return eResult;
@@ -3001,7 +3004,8 @@ void SfxMedium::UnlockFile( bool bReleaseLockStream )
}
catch ( uno::Exception& )
{
- SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.doc", "Locking exception: WebDAV while trying to lock the file " << exceptionToString(ex) );
}
}
return;
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 139d4aaa4c41..95e23b67c4ba 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -30,6 +30,7 @@
#include <unotools/pathoptions.hxx>
#include <tools/urlobj.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <svtools/ehdl.hxx>
#include <svtools/sfxecode.hxx>
#include <comphelper/processfactory.hxx>
@@ -1658,7 +1659,8 @@ void SfxDocTemplate_Impl::Rescan()
}
catch( const Exception& )
{
- SAL_WARN( "sfx.doc", "SfxDocTemplate_Impl::Rescan: caught an exception while doing the update!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.doc", "SfxDocTemplate_Impl::Rescan: caught an exception while doing the update! " << exceptionToString(ex) );
}
}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 157539132710..f3b7c4eeb48c 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -775,13 +775,10 @@ bool SfxDocTplService_Impl::createFolder( const OUString& rNewFolderURL,
aParent.insertNewContent( aType, aNames, aValues, rNewFolder );
bCreatedFolder = true;
}
- catch( RuntimeException& )
+ catch( Exception const & )
{
- SAL_WARN( "sfx.doc", "createFolder(): got runtime exception" );
- }
- catch( Exception& )
- {
- SAL_WARN( "sfx.doc", "createFolder(): Could not create new folder" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sfx.doc", "createFolder(): Could not create new folder " << exceptionToString(ex) );
}
}
else if ( bCreateParent )
diff --git a/solenv/bin/macosx-change-install-names.pl b/solenv/bin/macosx-change-install-names.pl
index ee8320c5607a..3d393a01235f 100644
--- a/solenv/bin/macosx-change-install-names.pl
+++ b/solenv/bin/macosx-change-install-names.pl
@@ -56,6 +56,7 @@ sub action($$$)
'shl/URELIB/URELIB' => '@loader_path',
'shl/OOO/URELIB' => '@loader_path',
'shl/OOO/OOO' => '@loader_path',
+ 'shl/URELIB/OOO' => '@loader_path',
'shl/OXT/URELIB' => '@executable_path/urelibs',
'shl/NONE/URELIB' => '@__VIA_LIBRARY_PATH__',
'shl/NONE/OOO' => '@__VIA_LIBRARY_PATH__',
diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx
index 08240e83ae03..61b1071462f5 100644
--- a/svl/source/config/itemholder2.cxx
+++ b/svl/source/config/itemholder2.cxx
@@ -29,6 +29,7 @@
#include <svl/cjkoptions.hxx>
#include <svl/ctloptions.hxx>
#include <svl/languageoptions.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/options.hxx>
ItemHolder2::ItemHolder2()
@@ -45,13 +46,14 @@ ItemHolder2::ItemHolder2()
throw;
}
#ifdef DBG_UTIL
- catch(const css::uno::Exception& rEx)
+ catch(const css::uno::Exception&)
{
static bool bMessage = true;
if(bMessage)
{
bMessage = false;
- SAL_WARN( "svl", "CreateInstance with arguments exception: " << rEx);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svl", "CreateInstance with arguments exception: " << exceptionToString(ex));
}
}
#else
diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx
index 15a558160015..106181eef50b 100644
--- a/svtools/source/contnr/contentenumeration.cxx
+++ b/svtools/source/contnr/contentenumeration.cxx
@@ -34,6 +34,7 @@
#include <osl/mutex.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace svt
{
@@ -282,9 +283,10 @@ namespace svt
{
SAL_WARN( "svtools.contnr", "FileViewContentEnumerator::enumerateFolderContent: caught an CommandAbortedException while enumerating!" );
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svtools.contnr", "FileViewContentEnumerator::enumerateFolderContent: caught an exception other than CommandAbortedException while enumerating!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svtools.contnr", "FileViewContentEnumerator::enumerateFolderContent: caught an exception other than CommandAbortedException while enumerating! " << exceptionToString(ex));
}
}
}
@@ -292,9 +294,10 @@ namespace svt
{
SAL_WARN( "svtools.contnr", "FileViewContentEnumerator::enumerateFolderContent: caught an CommandAbortedException!" );
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svtools.contnr", "FileViewContentEnumerator::enumerateFolderContent: caught an exception other than CommandAbortedException!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svtools.contnr", "FileViewContentEnumerator::enumerateFolderContent: caught an exception other than CommandAbortedException! " << exceptionToString(ex) );
}
IEnumerationResultHandler* pHandler = nullptr;
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index a2aba0e4a7c4..387be5f27d2a 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -53,6 +53,7 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <svx/svdview.hxx>
+#include <tools/diagnose_ex.h>
#include <cppuhelper/queryinterface.hxx>
#include <comphelper/servicehelper.hxx>
#include "AccessibleEmptyEditSource.hxx"
@@ -963,7 +964,8 @@ void SAL_CALL
}
catch (uno::RuntimeException const&)
{
- SAL_WARN("svx", "caught exception while disposing");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("svx", "caught exception while disposing " << exceptionToString(ex));
}
}
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 7f3773061e97..7329be790087 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -502,9 +502,10 @@ namespace svxform
m_pItemList->Select( pEntry );
bIsDocModified = true;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while adding submission" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while adding submission " << exceptionToString(ex) );
}
}
}
@@ -538,9 +539,10 @@ namespace svxform
pResId = RID_STR_DATANAV_ADD_ELEMENT;
xNewNode = m_xUIHelper->createElement( xParentNode, NEW_ELEMENT );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while create element" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while create element " << exceptionToString(ex) );
}
}
else
@@ -552,9 +554,10 @@ namespace svxform
{
xNewNode = m_xUIHelper->createAttribute( xParentNode, NEW_ATTRIBUTE );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while create attribute" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while create attribute " << exceptionToString(ex) );
}
}
@@ -566,13 +569,15 @@ namespace svxform
{
if ( e.Code == css::xml::dom::DOMExceptionType_DOMSTRING_SIZE_ERR )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): domexception: size error" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): domexception: size error " << exceptionToString(ex) );
}
SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): domexception while append child" );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while append child" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while append child " << exceptionToString(ex) );
}
try
@@ -584,18 +589,20 @@ namespace svxform
DBG_ASSERT( m_nAddAttributeId == _nToolBoxID
|| xPNode.is(), "XFormsPage::DoToolboxAction(): node not added" );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught " << exceptionToString(ex) );
}
try
{
m_xUIHelper->getBindingForNode( xNewNode, true );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while get binding for node" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while get binding for node " << exceptionToString(ex) );
}
pNode.reset(new ItemNode( xNewNode ));
}
@@ -610,9 +617,10 @@ namespace svxform
pNode.reset(new ItemNode( xNewBinding ));
eType = DITBinding;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while adding binding" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolBoxAction(): exception while adding binding " << exceptionToString(ex) );
}
}
@@ -640,9 +648,10 @@ namespace svxform
xPNode = xNode->getParentNode();
DBG_ASSERT( !xPNode.is(), "XFormsPage::RemoveEntry(): node not removed" );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -661,9 +670,10 @@ namespace svxform
Reference< XSet > xBindings( xModel->getBindings(), UNO_QUERY );
xBindings->remove( makeAny( xNewBinding ) );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -701,9 +711,10 @@ namespace svxform
eType = DITAttribute;
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught " << exceptionToString(ex) );
}
}
else if ( DGTBinding == m_eGroup )
@@ -724,9 +735,10 @@ namespace svxform
sNewName = m_xUIHelper->getNodeDisplayName(
pNode->m_xNode, m_pNaviWin->IsShowDetails() );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught " << exceptionToString(ex) );
}
}
else if (pNode)
@@ -740,9 +752,10 @@ namespace svxform
pNode->m_xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sNewName += sTemp;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::DoToolboxAction(): exception caught " << exceptionToString(ex) );
}
}
@@ -844,9 +857,10 @@ namespace svxform
sEntry += m_aReplaceString.toUI( sTemp );
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::AddEntry(Ref): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::AddEntry(Ref): exception caught " << exceptionToString(ex) );
}
}
else // then Binding Page
@@ -862,9 +876,10 @@ namespace svxform
pEntry = m_pItemList->InsertEntry(
sName, aImage, aImage, nullptr, false, TREELIST_APPEND, pNode );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::AddEntry(Ref): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::AddEntry(Ref): exception caught " << exceptionToString(ex) );
}
}
@@ -920,9 +935,10 @@ namespace svxform
pChild = m_pItemList->GetEntry( pEntry, nPos++ );
m_pItemList->SetEntryText( pChild, sEntry );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::EditEntry(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::EditEntry(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -972,9 +988,10 @@ namespace svxform
bRet = true;
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught " << exceptionToString(ex) );
}
}
else
@@ -989,9 +1006,10 @@ namespace svxform
{
pNode->m_xPropSet->getPropertyValue( sProperty ) >>= sName;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught " << exceptionToString(ex) );
}
std::unique_ptr<weld::MessageDialog> xQBox(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
@@ -1009,9 +1027,10 @@ namespace svxform
xModel->getBindings()->remove( makeAny( pNode->m_xPropSet ) );
bRet = true;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -1103,9 +1122,10 @@ namespace svxform
}
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::SetModel(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::SetModel(): exception caught " << exceptionToString(ex) );
}
break;
}
@@ -1135,9 +1155,10 @@ namespace svxform
}
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::SetModel(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::SetModel(): exception caught " << exceptionToString(ex) );
}
break;
}
@@ -1180,9 +1201,10 @@ namespace svxform
}
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::SetModel(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::SetModel(): exception caught " << exceptionToString(ex) );
}
break;
}
@@ -1231,9 +1253,10 @@ namespace svxform
if ( xRoot->hasChildNodes() )
AddChildren(nullptr, xRoot);
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::LoadInstance(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::LoadInstance(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -1287,9 +1310,10 @@ namespace svxform
bEnableAdd = false;
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::EnableMenuItems(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::EnableMenuItems(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -1329,9 +1353,10 @@ namespace svxform
pResId2 = RID_STR_DATANAV_REMOVE_ATTRIBUTE;
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "XFormsPage::EnableMenuItems(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "XFormsPage::EnableMenuItems(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -1470,9 +1495,10 @@ namespace svxform
if ( aAny >>= xModel )
xUIHelper.set( xModel, UNO_QUERY );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught " << exceptionToString(ex) );
}
DBG_ASSERT( xUIHelper.is(), "DataNavigatorWindow::MenuSelectHdl(): no UIHelper" );
@@ -1519,9 +1545,10 @@ namespace svxform
ModelSelectHdl(m_pModelsBox);
bIsDocModified = true;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -1579,9 +1606,10 @@ namespace svxform
m_pModelsBox->SelectEntryPos( nSelectedPos );
bIsDocModified = true;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -1600,9 +1628,10 @@ namespace svxform
{
xUIHelper->removeModel( m_xFrameModel, sSelectedModel );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught " << exceptionToString(ex) );
}
m_pModelsBox->RemoveEntry( nSelectedPos );
if ( m_pModelsBox->GetEntryCount() <= nSelectedPos )
@@ -1633,9 +1662,10 @@ namespace svxform
{
xUIHelper->newInstance( sName, sURL, !bLinkOnce );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught " << exceptionToString(ex) );
}
ModelSelectHdl( nullptr );
m_pTabCtrl->SetCurPageId( nInst );
@@ -1670,9 +1700,10 @@ namespace svxform
sURL,
!bLinkOnce );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught " << exceptionToString(ex) );
}
pPage->SetInstanceName(sNewName);
pPage->SetInstanceURL(sURL);
@@ -1723,7 +1754,8 @@ namespace svxform
}
catch (const Exception&)
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught " << exceptionToString(ex) );
}
m_pTabCtrl->RemovePage( nId );
m_pTabCtrl->SetCurPageId(m_pTabCtrl->GetPageId("instance"));
@@ -1854,9 +1886,10 @@ namespace svxform
{
m_xFrameModel = xCtrl->getModel();
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::LoadModels(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::LoadModels(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -1885,9 +1918,10 @@ namespace svxform
}
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::LoadModels(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::LoadModels(): exception caught " << exceptionToString(ex) );
}
}
@@ -1927,9 +1961,10 @@ namespace svxform
{
SAL_WARN( "svx.form", "DataNavigatorWindow::SetPageModel(): no such element" );
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::SetPageModel(): unexpected exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::SetPageModel(): unexpected exception " << exceptionToString(ex) );
}
}
@@ -1976,9 +2011,10 @@ namespace svxform
{
SAL_WARN( "svx.form", "DataNavigatorWindow::SetPageModel(): no such element" );
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "DataNavigatorWindow::SetPageModel(): unexpected exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "DataNavigatorWindow::SetPageModel(): unexpected exception " << exceptionToString(ex) );
}
}
@@ -2281,7 +2317,8 @@ namespace svxform
}
catch (const Exception&)
{
- SAL_WARN( "svx.form", "AddDataItemDialog::Dtor(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::Dtor(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -2400,9 +2437,10 @@ namespace svxform
// else: no property? then ignore.
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "copyPropSet(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "copyPropSet(): exception caught " << exceptionToString(ex) );
}
}
@@ -2438,9 +2476,10 @@ namespace svxform
sValue = m_xDefaultED->get_text();
m_pItemNode->m_xPropSet->setPropertyValue( PN_BINDING_EXPR, makeAny( sValue ) );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataDialog::OKHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataDialog::OKHdl(): exception caught " << exceptionToString(ex) );
}
}
else
@@ -2459,9 +2498,10 @@ namespace svxform
m_pItemNode->m_xNode = xNewNode;
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataDialog::OKHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataDialog::OKHdl(): exception caught " << exceptionToString(ex) );
}
}
// then close the dialog
@@ -2542,9 +2582,10 @@ namespace svxform
}
m_xDefaultED->set_text( m_pItemNode->m_xNode->getNodeValue() );
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught " << exceptionToString(ex) );
}
}
else if ( m_pItemNode->m_xPropSet.is() )
@@ -2560,9 +2601,10 @@ namespace svxform
if ( xBindings.is() )
xBindings->insert( makeAny( m_xTempBinding ) );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught " << exceptionToString(ex) );
}
}
OUString sTemp;
@@ -2582,9 +2624,10 @@ namespace svxform
m_xNameED->set_text( sTemp );
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught " << exceptionToString(ex) );
}
m_xDefaultBtn->show();
@@ -2613,7 +2656,8 @@ namespace svxform
}
catch (const Exception&)
{
- SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::InitFromNode(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -2661,9 +2705,10 @@ namespace svxform
}
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataItemDialog::InitDataTypeBox(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::InitDataTypeBox(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -2743,7 +2788,8 @@ namespace svxform
}
catch (const Exception&)
{
- SAL_WARN( "svx.form", "AddConditionDialog::Ctor(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddConditionDialog::Ctor(): exception caught " << exceptionToString(ex) );
}
}
@@ -2762,9 +2808,10 @@ namespace svxform
{
m_xBinding->getPropertyValue( PN_BINDING_NAMESPACES ) >>= xNameContnr;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataItemDialog::EditHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::EditHdl(): exception caught " << exceptionToString(ex) );
}
NamespaceItemDialog aDlg(this, xNameContnr);
aDlg.run();
@@ -2772,25 +2819,15 @@ namespace svxform
{
m_xBinding->setPropertyValue( PN_BINDING_NAMESPACES, makeAny( xNameContnr ) );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddDataItemDialog::EditHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddDataItemDialog::EditHdl(): exception caught " << exceptionToString(ex) );
}
}
IMPL_LINK_NOARG(AddConditionDialog, OKHdl, weld::Button&, void)
{
-/*!!!
- try
- {
- if ( m_xBinding.is() )
- m_xBinding->setPropertyValue( m_sPropertyName, makeAny( OUString( m_pConditionED->GetText() ) ) );
- }
- catch( const Exception& )
- {
- SAL_WARN( "svx.form", "AddConditionDialog, OKHdl: caught an exception!" );
- }
-*/
m_xDialog->response(RET_OK);
}
@@ -2809,9 +2846,10 @@ namespace svxform
{
sResult = m_xUIHelper->getResultForExpression( m_xBinding, ( m_sPropertyName == PN_BINDING_EXPR ), sCondition );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddConditionDialog::ResultHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddConditionDialog::ResultHdl(): exception caught " << exceptionToString(ex) );
}
}
m_xResultWin->set_text(sResult);
@@ -2922,9 +2960,10 @@ namespace svxform
m_rNamespaces->insertByName( sPrefix, makeAny( sURL ) );
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "NamespaceItemDialog::OKHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "NamespaceItemDialog::OKHdl(): exception caught " << exceptionToString(ex) );
}
// and close the dialog
m_xDialog->response(RET_OK);
@@ -2954,9 +2993,10 @@ namespace svxform
}
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "NamespaceItemDialog::LoadNamespaces(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "NamespaceItemDialog::LoadNamespaces(): exception caught " << exceptionToString(ex) );
}
}
@@ -2994,9 +3034,10 @@ namespace svxform
return;
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "ManageNamespacesDialog::OKHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "ManageNamespacesDialog::OKHdl(): exception caught " << exceptionToString(ex) );
}
// no error so close the dialog
@@ -3066,9 +3107,10 @@ namespace svxform
m_xNewSubmission = xModel->createSubmission();
m_xSubmission.set( m_xNewSubmission, UNO_QUERY );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddSubmissionDialog::OKHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddSubmissionDialog::OKHdl(): exception caught " << exceptionToString(ex) );
}
}
}
@@ -3094,9 +3136,10 @@ namespace svxform
sTemp = m_aReplaceString.toAPI( m_xReplaceLB->get_active_text() );
m_xSubmission->setPropertyValue( PN_SUBMISSION_REPLACE, makeAny( sTemp ) );
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddSubmissionDialog::OKHdl(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddSubmissionDialog::OKHdl(): exception caught " << exceptionToString(ex) );
}
}
@@ -3145,9 +3188,10 @@ namespace svxform
}
}
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddSubmissionDialog::FillAllBoxes(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddSubmissionDialog::FillAllBoxes(): exception caught " << exceptionToString(ex) );
}
}
@@ -3214,9 +3258,10 @@ namespace svxform
}
m_xReplaceLB->set_active(nPos);
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.form", "AddSubmissionDialog::FillAllBoxes(): exception caught" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.form", "AddSubmissionDialog::FillAllBoxes(): exception caught " << exceptionToString(ex) );
}
}
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 72b947ffb80d..da81ce1923f6 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -82,6 +82,7 @@
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sfx2/viewsh.hxx>
#include <o3tl/enumrange.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -824,9 +825,10 @@ SdrModel::GetDocumentStream( OUString const& rURL,
{
SAL_INFO("svx", "not found");
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
- SAL_WARN("svx", "exception: '" << e << "'");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("svx", "exception: " << exceptionToString(ex));
}
return nullptr;
}
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 30bb94c6d659..9951417613d5 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -39,6 +39,7 @@
#include <svx/strings.hrc>
#include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
#include <avmedia/mediawindow.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -300,9 +301,10 @@ static bool lcl_HandlePackageURL(
SAL_INFO("svx", "not found: '" << rURL << "'");
return false;
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
- SAL_WARN("svx", "exception: '" << e << "'");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("svx", "exception: " << exceptionToString(ex));
return false;
}
if (!xInStream.is())
diff --git a/svx/source/tbxctrls/tbxcolor.cxx b/svx/source/tbxctrls/tbxcolor.cxx
index 7112f7dada98..f2223e766909 100644
--- a/svx/source/tbxctrls/tbxcolor.cxx
+++ b/svx/source/tbxctrls/tbxcolor.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace svx
@@ -51,9 +52,10 @@ namespace svx
if ( xFrameProps.is() )
xFrameProps->getPropertyValue( PROPNAME_LAYOUTMANAGER ) >>= m_xLayouter;
}
- catch ( Exception& )
+ catch ( Exception const & )
{
- SAL_WARN( "svx.tbxcrtls", "ToolboxAccess::Ctor(): exception" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "svx.tbxcrtls", "ToolboxAccess::Ctor(): exception " << exceptionToString(ex) );
}
}
}
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index a720020a7fc4..876d9fc59d2e 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -73,6 +73,7 @@
#include <dflyobj.hxx>
#include <prevwpage.hxx>
#include <calbck.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -192,9 +193,10 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/,
{
xListener->notifyEvent( aEvent );
}
- catch( uno::RuntimeException const & r )
+ catch( uno::RuntimeException const & )
{
- SAL_WARN("sw.a11y", "Runtime exception caught while notifying shape: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.a11y", "Runtime exception caught while notifying shape: " << exceptionToString(ex));
}
}
}
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 2dc552cbf129..79e8930e39ec 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -19,6 +19,7 @@
#include <svx/svdview.hxx>
#include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
#include <editsh.hxx>
#include <fesh.hxx>
@@ -132,8 +133,9 @@ void SwEditShell::Undo(sal_uInt16 const nCount)
bRet = GetDoc()->GetIDocumentUndoRedo().Undo()
|| bRet;
}
- } catch (const css::uno::Exception & e) {
- SAL_WARN("sw.core", "SwEditShell::Undo(): exception caught: " << e);
+ } catch (const css::uno::Exception &) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.core", "SwEditShell::Undo(): exception caught: " << exceptionToString(ex));
}
if (bRestoreCursor)
@@ -185,8 +187,9 @@ void SwEditShell::Redo(sal_uInt16 const nCount)
bRet = GetDoc()->GetIDocumentUndoRedo().Redo()
|| bRet;
}
- } catch (const css::uno::Exception & e) {
- SAL_WARN("sw.core", "SwEditShell::Redo(): exception caught: " << e);
+ } catch (const css::uno::Exception &) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.core", "SwEditShell::Redo(): exception caught: " << exceptionToString(ex));
}
Pop(bRestoreCursor ? PopMode::DeleteCurrent : PopMode::DeleteStack);
@@ -210,8 +213,9 @@ void SwEditShell::Repeat(sal_uInt16 const nCount)
try {
::sw::RepeatContext context(*GetDoc(), *GetCursor());
GetDoc()->GetIDocumentUndoRedo().Repeat( context, nCount );
- } catch (const css::uno::Exception & e) {
- SAL_WARN("sw.core", "SwEditShell::Repeat(): exception caught: " << e);
+ } catch (const css::uno::Exception &) {
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.core", "SwEditShell::Repeat(): exception caught: " << exceptionToString(ex));
}
EndAllAction();
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 3aa8706bed1d..33eb71468d52 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -85,6 +85,7 @@
#include <sal/log.hxx>
#include <vcl/font.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <tools/diagnose_ex.h>
using namespace sax_fastparser;
using namespace ::comphelper;
@@ -1440,7 +1441,8 @@ void DocxExport::WriteEmbeddings()
}
catch(const uno::Exception&)
{
- SAL_WARN("sw.ww8", "WriteEmbeddings() ::Failed to copy Inputstream to outputstream exception caught!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.ww8", "WriteEmbeddings() ::Failed to copy Inputstream to outputstream exception caught! " << exceptionToString(ex));
}
xOutStream->closeOutput();
}
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 0aec06ae11d0..c125e92dc056 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -85,6 +85,7 @@
#include <istyleaccess.hxx>
#include <sfx2/DocumentMetadataAccess.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -185,8 +186,9 @@ ErrCode ReadThroughComponent(
else
xParser->parseStream( aParserInput );
}
- catch( xml::sax::SAXParseException& r )
+ catch( xml::sax::SAXParseException& r)
{
+ css::uno::Any ex( cppu::getCaughtException() );
// sax parser sends wrapped exceptions,
// try to find the original one
xml::sax::SAXException aSaxEx = *static_cast<xml::sax::SAXException*>(&r);
@@ -208,7 +210,7 @@ ErrCode ReadThroughComponent(
if( bEncrypted )
return ERRCODE_SFX_WRONGPASSWORD;
- SAL_WARN( "sw", "SAX parse exception caught while importing: " << r );
+ SAL_WARN( "sw", "SAX parse exception caught while importing: " << exceptionToString(ex) );
const OUString sErr( OUString::number( r.LineNumber )
+ ","
@@ -231,6 +233,7 @@ ErrCode ReadThroughComponent(
}
catch(const xml::sax::SAXException& r)
{
+ css::uno::Any ex( cppu::getCaughtException() );
packages::zip::ZipIOException aBrokenPackage;
if ( r.WrappedException >>= aBrokenPackage )
return ERRCODE_IO_BROKENPACKAGE;
@@ -238,22 +241,25 @@ ErrCode ReadThroughComponent(
if( bEncrypted )
return ERRCODE_SFX_WRONGPASSWORD;
- SAL_WARN( "sw", "SAX exception caught while importing: " << r);
+ SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) );
return ERR_SWG_READ_ERROR;
}
- catch(const packages::zip::ZipIOException& r)
+ catch(const packages::zip::ZipIOException&)
{
- SAL_WARN( "sw", "Zip exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) );
return ERRCODE_IO_BROKENPACKAGE;
}
- catch(const io::IOException& r)
+ catch(const io::IOException&)
{
- SAL_WARN( "sw", "IO exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) );
return ERR_SWG_READ_ERROR;
}
- catch(const uno::Exception& r)
+ catch(const uno::Exception&)
{
- SAL_WARN( "sw", "uno exception caught while importing: " << r );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "sw", "uno exception caught while importing: " << exceptionToString(ex) );
return ERR_SWG_READ_ERROR;
}
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index f08f7ba562ec..9f9423f04ac7 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -20,7 +20,7 @@
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
-
+#include <tools/diagnose_ex.h>
#include <xmloff/nmspmap.hxx>
#include <format.hxx>
#include <fmtcol.hxx>
@@ -343,9 +343,10 @@ SwXMLTextStyleContext_Impl::Finish( bool bOverwrite )
{
xPropSet->setPropertyValue(UNO_NAME_PARA_STYLE_CONDITIONS, uno::makeAny(aSeq));
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
- SAL_WARN("sw.xml", "exception when setting ParaStyleConditions: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.xml", "exception when setting ParaStyleConditions: " << exceptionToString(ex));
}
}
XMLTextStyleContext::Finish( bOverwrite );
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index c83c469734cb..cf8d1f3017a0 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/beans/XPropertyContainer.hpp>
#include <ooo/vba/word/WdBuiltInProperty.hpp>
#include <ooo/vba/office/MsoDocProperties.hpp>
+#include <tools/diagnose_ex.h>
#include <memory>
#include "wordvbahelper.hxx"
#include <fesh.hxx>
@@ -301,7 +302,8 @@ public:
}
catch (const uno::Exception&)
{
- SAL_WARN("sw.vba", "Got exception");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.vba", "Got exception " << exceptionToString(ex));
}
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 d5e5790445b1..49ecccf6a573 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -113,6 +113,7 @@
#include <connectivity/dbtools.hxx>
#include <connectivity/dbconversion.hxx>
#include <unotools/charclass.hxx>
+#include <tools/diagnose_ex.h>
#include <unomailmerge.hxx>
#include <sfx2/event.hxx>
@@ -2074,9 +2075,10 @@ OUString SwDBManager::GetDBField(uno::Reference<beans::XPropertySet> const & xCo
}
}
}
- catch (const uno::Exception& e)
+ catch (const uno::Exception&)
{
- SAL_WARN("sw.mailmerge", "exception caught: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.mailmerge", "exception caught: " << exceptionToString(ex));
}
}
@@ -3171,9 +3173,10 @@ void SwDBManager::InsertText(SwWrtShell& rSh,
{
pDlg->DataToDoc( aSelection , xSource, xConnection, xResSet);
}
- catch (const uno::Exception& e)
+ catch (const uno::Exception&)
{
- SAL_WARN("sw.mailmerge", "exception caught: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.mailmerge", "exception caught: " << exceptionToString(ex));
}
}
}
@@ -3189,9 +3192,10 @@ uno::Reference<sdbc::XDataSource> SwDBManager::getDataSourceAsParent(const uno::
if ( !xSource.is() )
xSource = dbtools::getDataSource(_sDataSourceName, ::comphelper::getProcessComponentContext());
}
- catch (const uno::Exception& e)
+ catch (const uno::Exception&)
{
- SAL_WARN("sw.mailmerge", "exception caught in getDataSourceAsParent(): " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.mailmerge", "exception caught in getDataSourceAsParent(): " << exceptionToString(ex));
}
return xSource;
}
@@ -3229,9 +3233,10 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat
}
}
}
- catch (const uno::Exception& e)
+ catch (const uno::Exception&)
{
- SAL_WARN("sw.mailmerge", "Caught exception while creating a new RowSet: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.mailmerge", "Caught exception while creating a new RowSet: " << exceptionToString(ex));
}
return xResultSet;
}
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 3c641d4dbc0b..930c5631864c 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -36,6 +36,7 @@
#include <rtl/instance.hxx>
#include <sal/log.hxx>
#include <unotools/configitem.hxx>
+#include <tools/diagnose_ex.h>
#include <mailmergehelper.hxx>
#include <swunohelper.hxx>
#include <dbmgr.hxx>
@@ -885,18 +886,20 @@ Reference< XResultSet> const & SwMailMergeConfigItem::GetResultSet() const
xRowProperties->setPropertyValue("ApplyFilter", makeAny(!m_pImpl->m_sFilter.isEmpty()));
xRowProperties->setPropertyValue("Filter", makeAny(m_pImpl->m_sFilter));
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN("sw.ui", "exception caught: " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.ui", "exception caught: " << exceptionToString(ex));
}
xRowSet->execute();
m_pImpl->m_xResultSet = xRowSet.get();
m_pImpl->m_xResultSet->first();
m_pImpl->m_nResultSetCursorPos = 1;
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN("sw.ui", "exception caught in: SwMailMergeConfigItem::GetResultSet() " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.ui", "exception caught in: SwMailMergeConfigItem::GetResultSet() " << exceptionToString(ex));
}
}
return m_pImpl->m_xResultSet;
@@ -932,9 +935,10 @@ void SwMailMergeConfigItem::SetFilter(OUString const & rFilter)
uno::Reference<XRowSet> xRowSet( m_pImpl->m_xResultSet, UNO_QUERY_THROW );
xRowSet->execute();
}
- catch (const Exception& e)
+ catch (const Exception&)
{
- SAL_WARN("sw.ui", "exception caught in SwMailMergeConfigItem::SetFilter(): " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sw.ui", "exception caught in SwMailMergeConfigItem::SetFilter(): " << exceptionToString(ex));
}
}
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 80a526d3ae20..324d456e37b0 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -97,7 +97,8 @@ struct DisposeControlModel
}
catch (const Exception&)
{
- SAL_WARN("toolkit", "caught an exception while disposing a component!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("toolkit", "caught an exception while disposing a component! " << exceptionToString(ex) );
}
}
};
@@ -816,7 +817,8 @@ namespace
}
catch (const Exception&)
{
- SAL_WARN("toolkit", "caught an exception while determining the dialog page!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("toolkit", "caught an exception while determining the dialog page! " << exceptionToString(ex) );
}
return nStep;
}
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index 50eb1136531a..6a8c77c11941 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -29,6 +29,7 @@
#include <cppuhelper/implbase.hxx>
#include <helper/unopropertyarrayhelper.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -466,9 +467,9 @@ void SAL_CALL TreeEditListenerMultiplexer::nodeEditing( const Reference< XTreeNo
if ( e.Context == xListener || !e.Context.is() )
aIt.remove();
}
- catch( const RuntimeException& e )
+ catch( const RuntimeException& )
{
- DISPLAY_EXCEPTION( TreeEditListenerMultiplexer, nodeEditing, e )
+ DISPLAY_EXCEPTION( TreeEditListenerMultiplexer, nodeEditing )
}
}
}
@@ -489,9 +490,9 @@ void SAL_CALL TreeEditListenerMultiplexer::nodeEdited( const Reference< XTreeNod
if ( e.Context == xListener || !e.Context.is() )
aIt.remove();
}
- catch( const RuntimeException& e )
+ catch( const RuntimeException& )
{
- DISPLAY_EXCEPTION( TreeEditListenerMultiplexer, nodeEdited, e )
+ DISPLAY_EXCEPTION( TreeEditListenerMultiplexer, nodeEdited )
}
}
}
diff --git a/toolkit/source/helper/listenermultiplexer.cxx b/toolkit/source/helper/listenermultiplexer.cxx
index 7083ee0ca03d..a1c4d8a53c0f 100644
--- a/toolkit/source/helper/listenermultiplexer.cxx
+++ b/toolkit/source/helper/listenermultiplexer.cxx
@@ -20,6 +20,7 @@
#include <toolkit/helper/listenermultiplexer.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <cppuhelper/queryinterface.hxx>
+#include <tools/diagnose_ex.h>
// class ListenerMultiplexerBase
@@ -179,9 +180,9 @@ void TabListenerMultiplexer::changed( sal_Int32 evt, const css::uno::Sequence< c
if ( e.Context == xListener || !e.Context.is() )
aIt.remove();
}
- catch(const css::uno::RuntimeException& e)
+ catch(const css::uno::RuntimeException&)
{
- DISPLAY_EXCEPTION( TabListenerMultiplexer, changed, e )
+ DISPLAY_EXCEPTION( TabListenerMultiplexer, changed )
}
}
}
diff --git a/ucb/Library_ucpexpand1.mk b/ucb/Library_ucpexpand1.mk
index a3f5fe1b3f2c..a0af1d0ffd4e 100644
--- a/ucb/Library_ucpexpand1.mk
+++ b/ucb/Library_ucpexpand1.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_Library_use_libraries,ucpexpand1,\
cppu \
cppuhelper \
sal \
+ tl \
ucbhelper \
))
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 74b4771b60ee..3454a7afd655 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -48,6 +48,7 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase.hxx>
#include <ucbhelper/getcomponentcontext.hxx>
+#include <tools/diagnose_ex.h>
#include "ucbstore.hxx"
using namespace com::sun::star::beans;
@@ -906,7 +907,8 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider()
}
catch (const Exception&)
{
- SAL_WARN( "ucb", "caught exception!" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "ucb", "caught exception! " << exceptionToString(ex) );
}
}
}
diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx
index b1d094ac31e7..49a708fdc6a8 100644
--- a/ucb/source/ucp/expand/ucpexpand.cxx
+++ b/ucb/source/ucp/expand/ucpexpand.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
#include <com/sun/star/ucb/XContentProvider.hpp>
+#include <tools/diagnose_ex.h>
#define EXPAND_PROTOCOL "vnd.sun.star.expand"
@@ -199,9 +200,10 @@ sal_Int32 ExpandContentProviderImpl::compareContentIds(
OUString uri2( expandUri( xId2 ) );
return uri1.compareTo( uri2 );
}
- catch (const ucb::IllegalIdentifierException & exc)
+ catch (const ucb::IllegalIdentifierException &)
{
- SAL_WARN( "ucb", exc );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "ucb", exceptionToString(ex) );
return -1;
}
}
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 70d1880ca6ca..bf74770f34a2 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -47,6 +47,7 @@
#include <unotools/syslocaleoptions.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
ItemHolder1::ItemHolder1()
: ItemHolderMutexBase()
@@ -60,13 +61,14 @@ ItemHolder1::ItemHolder1()
xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));
}
#ifdef DBG_UTIL
- catch(const css::uno::Exception& rEx)
+ catch(const css::uno::Exception&)
{
static bool bMessage = true;
if(bMessage)
{
bMessage = false;
- SAL_WARN( "unotools", "CreateInstance with arguments exception: " << rEx);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "unotools", "CreateInstance with arguments exception: " << exceptionToString(ex));
}
}
#else
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index 25d8d21f7ecf..ae5eb752bbff 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -32,6 +32,7 @@
#include <unotools/configmgr.hxx>
#include <comphelper/configurationhelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
#include "itemholder1.hxx"
@@ -58,9 +59,6 @@
}
#endif // DEBUG_VIEWOPTIONS
-#define SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex) \
- SAL_WARN("unotools", "Unexpected exception caught. Original message was: " << ex.Message);
-
// initialization!
SvtViewOptionsBase_Impl* SvtViewOptions::m_pDataContainer_Dialogs = nullptr ;
@@ -160,12 +158,13 @@ SvtViewOptionsBase_Impl::SvtViewOptionsBase_Impl( const OUString& sList )
if (m_xRoot.is())
m_xRoot->getByName(sList) >>= m_xSet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
m_xRoot.clear();
m_xSet.clear();
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -214,10 +213,11 @@ bool SvtViewOptionsBase_Impl::Exists( const OUString& sName )
if (m_xSet.is())
bExists = m_xSet->hasByName(sName);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
bExists = false;
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return bExists;
@@ -245,9 +245,10 @@ void SvtViewOptionsBase_Impl::Delete( const OUString& sName )
}
catch(const css::container::NoSuchElementException&)
{ }
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -272,10 +273,11 @@ OUString SvtViewOptionsBase_Impl::GetWindowState( const OUString& sName )
if (xNode.is())
xNode->getPropertyValue(PROPERTY_WINDOWSTATE) >>= sWindowState;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
sWindowState.clear();
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return sWindowState;
@@ -296,9 +298,10 @@ void SvtViewOptionsBase_Impl::SetWindowState( const OUString& sName ,
xNode->setPropertyValue(PROPERTY_WINDOWSTATE, css::uno::makeAny(sState));
::comphelper::ConfigurationHelper::flush(m_xRoot);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -333,9 +336,10 @@ css::uno::Sequence< css::beans::NamedValue > SvtViewOptionsBase_Impl::GetUserDat
return lUserData;
}
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return css::uno::Sequence< css::beans::NamedValue >();
@@ -370,9 +374,10 @@ void SvtViewOptionsBase_Impl::SetUserData( const OUString&
}
::comphelper::ConfigurationHelper::flush(m_xRoot);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -397,10 +402,11 @@ css::uno::Any SvtViewOptionsBase_Impl::GetUserItem( const OUString& sName ,
}
catch(const css::container::NoSuchElementException&)
{ aItem.clear(); }
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
aItem.clear();
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return aItem;
@@ -430,9 +436,10 @@ void SvtViewOptionsBase_Impl::SetUserItem( const OUString& sName ,
}
::comphelper::ConfigurationHelper::flush(m_xRoot);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -451,9 +458,10 @@ OString SvtViewOptionsBase_Impl::GetPageID( const OUString& sName )
if (xNode.is())
xNode->getPropertyValue(PROPERTY_PAGEID) >>= sID;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return sID.toUtf8();
@@ -474,9 +482,10 @@ void SvtViewOptionsBase_Impl::SetPageID( const OUString& sName ,
xNode->setPropertyValue(PROPERTY_PAGEID, css::uno::makeAny(OUString::fromUtf8(sID)));
::comphelper::ConfigurationHelper::flush(m_xRoot);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -501,9 +510,10 @@ SvtViewOptionsBase_Impl::State SvtViewOptionsBase_Impl::GetVisible( const OUStri
}
}
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return eState;
@@ -524,9 +534,10 @@ void SvtViewOptionsBase_Impl::SetVisible( const OUString& sName ,
xNode->setPropertyValue(PROPERTY_VISIBLE, css::uno::makeAny(bVisible));
::comphelper::ConfigurationHelper::flush(m_xRoot);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
}
@@ -556,10 +567,11 @@ css::uno::Reference< css::uno::XInterface > SvtViewOptionsBase_Impl::impl_getSet
}
catch(const css::container::NoSuchElementException&)
{ xNode.clear(); }
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
xNode.clear();
- SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex)
+ SAL_WARN("unotools", "Unexpected exception caught. " << exceptionToString(ex));
}
return xNode;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index cc8f1c555621..f0e13f5c54d8 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2038,9 +2038,10 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
CheckRedline( xFootnote->getAnchor( ) );
}
- catch( const uno::Exception& e )
+ catch( const uno::Exception& )
{
- SAL_WARN("writerfilter.dmapper", "exception in PushFootOrEndnote: " << e);
+ SAL_WARN("writerfilter.dmapper", "exception in PushFootOrEndnote: "
+ << exceptionToString( cppu::getCaughtException() ));
}
}
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index c19f566ad286..0d00b0eff303 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -182,10 +182,11 @@ void OOXMLDocumentImpl::importSubStreamRelations(const OOXMLStream::Pointer_t& p
{
cStream = OOXMLDocumentFactory::createStream(pStream, nType);
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
SAL_WARN("writerfilter.ooxml", "importSubStreamRelations: exception while "
- "importing stream " << nType << " : " << e);
+ "importing stream " << nType << " : " << exceptionToString(ex));
return;
}
@@ -202,10 +203,11 @@ void OOXMLDocumentImpl::importSubStreamRelations(const OOXMLStream::Pointer_t& p
uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder(xml::dom::DocumentBuilder::create(xcpContext));
xRelation = xDomBuilder->parse(xcpInputStream);
}
- catch (uno::Exception const& e)
+ catch (uno::Exception const&)
{
+ css::uno::Any ex( cppu::getCaughtException() );
SAL_WARN("writerfilter.ooxml", "importSubStream: exception while "
- "parsing stream " << nType << " : " << e);
+ "parsing stream " << nType << " : " << exceptionToString(ex));
mxCustomXmlProsDom = xRelation;
}
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index ceee2fd60b5c..43769342a293 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -27,6 +27,7 @@
#include <sal/log.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <tools/diagnose_ex.h>
#include "XMLChartPropertyContext.hxx"
@@ -102,7 +103,8 @@ void XMLChartStyleContext::FillPropertySet(
}
catch( beans::UnknownPropertyException& )
{
- SAL_WARN( "xmloff", "unknown property exception -> shape style not completely imported for chart style" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "xmloff", "unknown property exception -> shape style not completely imported for chart style " << exceptionToString(ex) );
}
lcl_NumberFormatStyleToProperty( msDataStyleName, "NumberFormat", mrStyles, rPropSet );
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 6913eb475ef7..561e3d5aa3c3 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1989,7 +1989,8 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc,
}
}
} catch (uno::Exception &) {
- SAL_WARN("xmloff.core","SvXMLImport::SetXmlId: exception?");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff.core","SvXMLImport::SetXmlId: exception " << exceptionToString(ex));
}
}
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 4e32eba229d8..04d4f2813aa0 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -628,7 +628,8 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
catch(const uno::Exception&)
{
- SAL_WARN("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export " << exceptionToString(ex));
}
if( xSet.is() )
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 5fc0ff9c8d34..39eb2d530afd 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <tools/diagnose_ex.h>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlprmap.hxx>
@@ -593,7 +594,8 @@ void XMLTableExport::exportTableTemplates()
}
catch(const Exception&)
{
- SAL_WARN("xmloff", "XMLTableExport::exportTableTemplates(), export Writer specific attributes, exception caught!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff", "XMLTableExport::exportTableTemplates(), export Writer specific attributes, exception caught! " << exceptionToString(ex));
}
pElements++;
}
@@ -650,7 +652,8 @@ void XMLTableExport::exportTableTemplates()
}
catch(const Exception&)
{
- SAL_WARN("xmloff", "XMLTableExport::exportTableTemplates(), export Writer specific styles, exception caught!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff", "XMLTableExport::exportTableTemplates(), export Writer specific styles, exception caught!" << exceptionToString(ex));
}
pElements++;
}
@@ -658,12 +661,14 @@ void XMLTableExport::exportTableTemplates()
}
catch(const Exception&)
{
- OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught while exporting a table design!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff", "XMLTableExport::exportTableDesigns(), exception caught while exporting a table design! " << exceptionToString(ex));
}
}
catch(const Exception&)
{
- OSL_FAIL("xmloff::XMLTableExport::exportTableDesigns(), exception caught!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff", "XMLTableExport::exportTableDesigns(), exception caught! " << exceptionToString(ex));
}
}
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 2f7ba902da3b..2cf7423f6411 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/style/XStyle.hpp>
+#include <tools/diagnose_ex.h>
#include <xmloff/table/XMLTableImport.hxx>
#include <xmloff/xmltkmap.hxx>
@@ -291,9 +292,10 @@ void XMLTableImport::insertTabletemplate(const OUString& rsStyleName, bool bOver
}
}
}
- catch (Exception&)
+ catch (Exception const &)
{
- SAL_WARN("xmloff.table", "XMLTableImport::insertTabletemplate(), exception caught!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff.table", "XMLTableImport::insertTabletemplate(), exception caught!" << exceptionToString(ex));
}
if (xTemplate.is())
@@ -306,7 +308,8 @@ void XMLTableImport::insertTabletemplate(const OUString& rsStyleName, bool bOver
}
catch (Exception&)
{
- SAL_WARN("xmloff.table", "XMLTableImport::insertTabletemplate(), exception caught!");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("xmloff.table", "XMLTableImport::insertTabletemplate(), exception caught!" << exceptionToString(ex));
}
}
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 0e01b505a644..febd07d1b58d 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <unotools/datetime.hxx>
@@ -268,7 +269,8 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, AddLocPBHdl, weld::Button&, void)
}
catch( uno::Exception& )
{
- SAL_WARN( "xmlsecurity.dialogs", "MacroSecurityTrustedSourcesTP::AddLocPBHdl(): exception from folder picker" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN( "xmlsecurity.dialogs", "MacroSecurityTrustedSourcesTP::AddLocPBHdl(): exception from folder picker" << exceptionToString(ex) );
}
}