summaryrefslogtreecommitdiff
path: root/oox
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 /oox
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>
Diffstat (limited to 'oox')
-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
4 files changed, 16 insertions, 8 deletions
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;
}