From 48fbfe38f60de731ff8bec0372179bedd6670af4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 Apr 2018 16:20:13 +0200 Subject: 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 Reviewed-by: Noel Grandin --- xmloff/source/chart/SchXMLExport.cxx | 13 +++++++------ xmloff/source/chart/SchXMLImport.cxx | 9 +++++---- xmloff/source/chart/SchXMLSeries2Context.cxx | 5 +++-- xmloff/source/chart/SchXMLSeriesHelper.cxx | 5 +++-- xmloff/source/chart/SchXMLTools.cxx | 13 +++++++------ 5 files changed, 25 insertions(+), 20 deletions(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 3b51533cc14b..c2768d40adf0 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -105,6 +105,7 @@ #include #include +#include #include "MultiPropertySetHandler.hxx" #include "PropertyMap.hxx" @@ -344,9 +345,9 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen } } } - catch( const uno::Exception & ex ) + catch( const uno::Exception & ) { - SAL_WARN("xmloff.chart", "Exception caught. " << ex); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } return xResult; @@ -451,9 +452,9 @@ bool lcl_isSeriesAttachedToFirstAxis( xProp->getPropertyValue("AttachedAxisIndex") >>= nAxisIndex; bResult = (0==nAxisIndex); } - catch( const uno::Exception & ex ) + catch( const uno::Exception & ) { - SAL_WARN("xmloff.chart", "Exception caught. Type: " << OUString::createFromAscii( typeid( ex ).name()) << ", Message: " << ex); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } return bResult; @@ -3665,9 +3666,9 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference< } } } - catch( const uno::Exception & ex ) + catch( const uno::Exception & ) { - SAL_WARN("xmloff.chart", "Exception caught. Type: " << OUString::createFromAscii( typeid( ex ).name()) << ", Message: " << ex); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } } diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index c1cdfc91d813..081be8686bd0 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -50,6 +50,7 @@ #include #include +#include #include using namespace com::sun::star; @@ -404,9 +405,9 @@ void SchXMLImportHelper::DeleteDataSeries( } } } - catch( const uno::Exception & ex ) + catch( const uno::Exception &) { - SAL_WARN("xmloff.chart", "Exception caught. " << ex); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } } @@ -482,9 +483,9 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries( } } } - catch( const uno::Exception & ex ) + catch( const uno::Exception & ) { - SAL_WARN("xmloff.chart", "Exception caught. Type: " << OUString::createFromAscii( typeid( ex ).name()) << ", Message: " << ex); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } return xResult; } diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index b1555ee2b0c4..b646a2e891f5 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include @@ -467,9 +468,9 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW ); xSink->setData( aSeq ); } - catch( const uno::Exception & ex ) + catch( const uno::Exception &) { - SAL_WARN("xmloff.chart", "Exception caught. " << ex); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } //init mbSymbolSizeIsMissingInFile: diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index 7ead41dfb260..7391109664a5 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -26,6 +26,7 @@ #include #include +#include #include @@ -59,9 +60,9 @@ using ::com::sun::star::uno::Sequence; } } } - catch( const uno::Exception & ex ) + catch( const uno::Exception & ) { - SAL_WARN("xmloff.chart", "Exception caught. Type: " << OUString::createFromAscii( typeid( ex ).name() ) << ", Message: " << ex ); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } return aResult; diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 003a6f6f3fb7..ff3647b82ab7 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -505,9 +506,9 @@ void CreateCategories( xLabeledSeq->setValues(xSequence); } - catch( const lang::IllegalArgumentException & ex ) + catch( const lang::IllegalArgumentException & ) { - SAL_WARN("xmloff.chart", "IllegalArgumentException caught, Message: " << ex ); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } aData.Categories.set( xLabeledSeq ); if( pLSequencesPerIndex ) @@ -644,9 +645,9 @@ void setXMLRangePropertyAtDataSequence( if( xInfo.is() && xInfo->hasPropertyByName( aXMLRangePropName )) xProp->setPropertyValue( aXMLRangePropName, uno::makeAny( rXMLRange )); } - catch( const uno::Exception & ex ) + catch( const uno::Exception & ) { - SAL_WARN("xmloff.chart", "Exception caught, Message: " << ex ); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } } @@ -671,9 +672,9 @@ bool getXMLRangePropertyFromDataSequence( if( bClearProp && bResult ) xProp->setPropertyValue( aXMLRangePropName, uno::Any( OUString())); } - catch( const uno::Exception & ex ) + catch( const uno::Exception & ) { - SAL_WARN("xmloff.chart", "Exception caught, Message: " << ex ); + DBG_UNHANDLED_EXCEPTION("xmloff.chart"); } } return bResult; -- cgit