summaryrefslogtreecommitdiff
path: root/sc/source/filter/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 /sc/source/filter/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 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/excelfilter.cxx6
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx11
2 files changed, 11 insertions, 6 deletions
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;