summaryrefslogtreecommitdiff
path: root/svtools/source
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 /svtools/source
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 'svtools/source')
-rw-r--r--svtools/source/config/accessibilityoptions.cxx49
-rw-r--r--svtools/source/config/printoptions.cxx57
-rw-r--r--svtools/source/misc/embedhlp.cxx9
3 files changed, 59 insertions, 56 deletions
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index 98f5eb96a452..6953d1399bfb 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -35,6 +35,7 @@
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <rtl/instance.hxx>
+#include <tools/diagnose_ex.h>
#include "itemholder2.hxx"
@@ -92,10 +93,10 @@ SvtAccessibilityOptions_Impl::SvtAccessibilityOptions_Impl()
::comphelper::EConfigurationModes::Standard ),
css::uno::UNO_QUERY);
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
m_xCfg.clear();
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
}
}
@@ -109,9 +110,9 @@ bool SvtAccessibilityOptions_Impl::GetIsForPagePreviews() const
if(xNode.is())
xNode->getPropertyValue("IsForPagePreviews") >>= bRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
}
@@ -126,9 +127,9 @@ bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const
if(xNode.is())
xNode->getPropertyValue("IsHelpTipsDisappear") >>= bRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -144,9 +145,9 @@ bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const
if(xNode.is())
xNode->getPropertyValue("IsAllowAnimatedGraphics") >>= bRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -162,9 +163,9 @@ bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedText() const
if(xNode.is())
xNode->getPropertyValue("IsAllowAnimatedText") >>= bRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -180,9 +181,9 @@ bool SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const
if(xNode.is())
xNode->getPropertyValue("IsAutomaticFontColor") >>= bRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -198,9 +199,9 @@ sal_Int16 SvtAccessibilityOptions_Impl::GetHelpTipSeconds() const
if(xNode.is())
xNode->getPropertyValue("HelpTipSeconds") >>= nRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -216,9 +217,9 @@ bool SvtAccessibilityOptions_Impl::IsSelectionInReadonly() const
if(xNode.is())
xNode->getPropertyValue("IsSelectionInReadonly") >>= bRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -234,9 +235,9 @@ sal_Int16 SvtAccessibilityOptions_Impl::GetEdgeBlending() const
if(xNode.is())
xNode->getPropertyValue("EdgeBlending") >>= nRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -252,9 +253,9 @@ sal_Int16 SvtAccessibilityOptions_Impl::GetListBoxMaximumLineCount() const
if(xNode.is())
xNode->getPropertyValue("ListBoxMaximumLineCount") >>= nRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -270,9 +271,9 @@ sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const
if(xNode.is())
xNode->getPropertyValue("ColorValueSetColumnCount") >>= nRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -288,9 +289,9 @@ bool SvtAccessibilityOptions_Impl::GetPreviewUsesCheckeredBackground() const
if(xNode.is())
xNode->getPropertyValue("PreviewUsesCheckeredBackground") >>= bRet;
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx
index c84b3f867cfd..f5d3c178f471 100644
--- a/svtools/source/config/printoptions.cxx
+++ b/svtools/source/config/printoptions.cxx
@@ -35,6 +35,7 @@
#include "itemholder2.hxx"
#include <sal/macros.h>
+#include <tools/diagnose_ex.h>
static const sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
@@ -134,11 +135,11 @@ SvtPrintOptions_Impl::SvtPrintOptions_Impl(const OUString& rConfigRoot)
m_xCfg->getByName(sTok) >>= m_xNode;
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
m_xNode.clear();
m_xCfg.clear();
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
}
}
@@ -154,9 +155,9 @@ bool SvtPrintOptions_Impl::IsReduceTransparency() const
xSet->getPropertyValue(PROPERTYNAME_REDUCETRANSPARENCY) >>= bRet;
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -174,9 +175,9 @@ sal_Int16 SvtPrintOptions_Impl::GetReducedTransparencyMode() const
xSet->getPropertyValue(PROPERTYNAME_REDUCEDTRANSPARENCYMODE) >>= nRet;
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -196,9 +197,9 @@ bool SvtPrintOptions_Impl::IsReduceGradients() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -218,9 +219,9 @@ sal_Int16 SvtPrintOptions_Impl::GetReducedGradientMode() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -240,9 +241,9 @@ sal_Int16 SvtPrintOptions_Impl::GetReducedGradientStepCount() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -262,9 +263,9 @@ bool SvtPrintOptions_Impl::IsReduceBitmaps() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -284,9 +285,9 @@ sal_Int16 SvtPrintOptions_Impl::GetReducedBitmapMode() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -306,9 +307,9 @@ sal_Int16 SvtPrintOptions_Impl::GetReducedBitmapResolution() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return nRet;
@@ -328,9 +329,9 @@ bool SvtPrintOptions_Impl::IsReducedBitmapIncludesTransparency() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -350,9 +351,9 @@ bool SvtPrintOptions_Impl::IsConvertToGreyscales() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -373,9 +374,9 @@ bool SvtPrintOptions_Impl::IsPDFAsStandardPrintJobFormat() const
}
}
}
- catch (const css::uno::Exception& ex)
+ catch (const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
return bRet;
@@ -463,9 +464,9 @@ void SvtPrintOptions_Impl::impl_setValue (const OUString& sProp, bool bNew )
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
}
@@ -491,9 +492,9 @@ void SvtPrintOptions_Impl::impl_setValue (const OUString& sProp,
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
}
- catch(const css::uno::Exception& ex)
+ catch(const css::uno::Exception&)
{
- SAL_WARN("svtools.config", "Caught unexpected: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.config");
}
}
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index c7d0e4d82c01..d339b22d3b0c 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/chart2/XDefaultSizeTransmitter.hpp>
#include <cppuhelper/implbase.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
#include <memory>
using namespace com::sun::star;
@@ -437,9 +438,9 @@ const Graphic* EmbeddedObjectRef::GetGraphic() const
else if ( !mpImpl->pGraphic )
const_cast < EmbeddedObjectRef* >(this)->GetReplacement(false);
}
- catch( const uno::Exception& ex )
+ catch( const uno::Exception& )
{
- SAL_WARN("svtools.misc", "Something went wrong on getting the graphic: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.misc", "Something went wrong on getting the graphic");
}
return mpImpl->pGraphic.get();
@@ -570,9 +571,9 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( bool bUpdate ) const
pStream->Seek(0);
return pStream;
}
- catch (const uno::Exception& ex)
+ catch (const uno::Exception&)
{
- SAL_WARN("svtools.misc", "discarding broken embedded object preview: " << ex);
+ DBG_UNHANDLED_EXCEPTION("svtools.misc", "discarding broken embedded object preview");
delete pStream;
xStream.clear();
}