summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
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 'xmloff')
-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
5 files changed, 22 insertions, 10 deletions
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));
}
}