summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-05 16:20:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-09 08:46:34 +0200
commit48fbfe38f60de731ff8bec0372179bedd6670af4 (patch)
tree2a1bbc4a2207d049d38c058d7f4ebb06a4f01182 /unotools
parent115a8539038ecdd5e496fb6c84101c5b14d11068 (diff)
use more DBG_UNHANDLED_EXCEPTION
so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/configitem.cxx5
-rw-r--r--unotools/source/config/historyoptions.cxx38
-rw-r--r--unotools/source/config/useroptions.cxx13
-rw-r--r--unotools/source/misc/mediadescriptor.cxx5
4 files changed, 32 insertions, 29 deletions
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 0ee2a75ded14..e2f68df9388d 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -42,6 +42,7 @@
#include <comphelper/solarmutex.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
using namespace utl;
using namespace com::sun::star::uno;
@@ -1089,9 +1090,9 @@ bool ConfigItem::AddNode(const OUString& rNode, const OUString& rNewNode)
}
xBatch->commitChanges();
}
- catch (const Exception& rEx)
+ catch (const Exception&)
{
- SAL_WARN("unotools.config", "Exception from AddNode(): " << rEx);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
bRet = false;
}
}
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index d867f768d9bf..7b627b57c9fa 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <comphelper/configurationhelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::std;
using namespace ::utl;
@@ -112,12 +113,11 @@ SvtHistoryOptions_Impl::SvtHistoryOptions_Impl()
::comphelper::EConfigurationModes::Standard),
uno::UNO_QUERY);
}
- catch(const uno::Exception& ex)
+ catch(const uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
m_xCfg.clear();
m_xCommonXCU.clear();
-
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
@@ -146,9 +146,9 @@ sal_uInt32 SvtHistoryOptions_Impl::GetCapacity(EHistoryType eHistory) const
break;
}
}
- catch (const uno::Exception& ex)
+ catch (const uno::Exception&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
return nSize;
@@ -174,9 +174,9 @@ uno::Reference<container::XNameAccess> SvtHistoryOptions_Impl::GetListAccess(EHi
break;
}
}
- catch (const uno::Exception& ex)
+ catch (const uno::Exception&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
return xListAccess;
@@ -213,9 +213,9 @@ void SvtHistoryOptions_Impl::impl_truncateList(EHistoryType eHistory, sal_uInt32
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
}
- catch(const uno::Exception& ex)
+ catch(const uno::Exception&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
}
@@ -246,9 +246,9 @@ void SvtHistoryOptions_Impl::Clear( EHistoryType eHistory )
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
- catch(const uno::Exception& ex)
+ catch(const uno::Exception&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
}
@@ -274,9 +274,9 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
xListAccess->getByName(s_sItemList) >>= xItemList;
xListAccess->getByName(s_sOrderList) >>= xOrderList;
}
- catch(const uno::Exception& ex)
+ catch(const uno::Exception&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
const sal_Int32 nLength = xOrderList->getElementNames().getLength();
@@ -301,7 +301,7 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
seqProperties[s_nOffsetThumbnail].Value = xSet->getPropertyValue(s_sThumbnail);
aRet[nCount++] = seqProperties;
}
- catch(const uno::Exception& ex)
+ catch(const uno::Exception&)
{
// <https://bugs.libreoffice.org/show_bug.cgi?id=46074>
// "FILEOPEN: No Recent Documents..." discusses a problem
@@ -310,7 +310,7 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
// ignore such corrupted individual items here, so that at
// least newly added items are successfully reported back
// from this function:
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
}
assert(nCount <= nLength);
@@ -442,9 +442,9 @@ void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
}
- catch(const uno::Exception& ex)
+ catch(const uno::Exception&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
}
@@ -506,9 +506,9 @@ void SvtHistoryOptions_Impl::DeleteItem(EHistoryType eHistory, const OUString& s
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
- catch (const uno::Exception& ex)
+ catch (const uno::Exception&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
}
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index fbc7aaf37f6f..62ede8962c24 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -42,6 +42,7 @@
#include <comphelper/processfactory.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <o3tl/enumarray.hxx>
+#include <tools/diagnose_ex.h>
using namespace utl;
using namespace com::sun::star;
@@ -154,10 +155,10 @@ SvtUserOptions::Impl::Impl() :
{
}
}
- catch (uno::Exception const& ex)
+ catch (uno::Exception const&)
{
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
m_xCfg.clear();
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
}
}
@@ -170,9 +171,9 @@ ValueType SvtUserOptions::Impl::GetValue_Impl (UserOptToken nToken) const
if (m_xData.is())
m_xData->getPropertyValue(OUString::createFromAscii(vOptionNames[nToken])) >>= sToken;
}
- catch (uno::Exception const& ex)
+ catch (uno::Exception const&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
return sToken;
}
@@ -186,9 +187,9 @@ void SvtUserOptions::Impl::SetValue_Impl (UserOptToken nToken, ValueType const&
m_xData->setPropertyValue(OUString::createFromAscii(vOptionNames[nToken]), uno::makeAny(sToken));
comphelper::ConfigurationHelper::flush(m_xCfg);
}
- catch (uno::Exception const& ex)
+ catch (uno::Exception const&)
{
- SAL_WARN("unotools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.config");
}
}
diff --git a/unotools/source/misc/mediadescriptor.cxx b/unotools/source/misc/mediadescriptor.cxx
index 5bb5660afcf8..21f3ab959a98 100644
--- a/unotools/source/misc/mediadescriptor.cxx
+++ b/unotools/source/misc/mediadescriptor.cxx
@@ -51,6 +51,7 @@
#include <comphelper/processfactory.hxx>
#include <tools/urlobj.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
namespace utl {
@@ -519,9 +520,9 @@ bool MediaDescriptor::impl_addInputStream( bool bLockFile )
return impl_openStreamWithURL( removeFragment(sURL), bLockFile );
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("unotools.misc", "invalid MediaDescriptor detected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("unotools.misc", "invalid MediaDescriptor detected");
return false;
}
}