Kaydet (Commit) 48fbfe38 authored tarafından Noel Grandin's avatar Noel Grandin

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/52465Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 115a8539
......@@ -49,6 +49,7 @@
#include <vcl/graph.hxx>
#include <vcl/settings.hxx>
#include <o3tl/functional.hxx>
#include <tools/diagnose_ex.h>
#include <algorithm>
#include <iterator>
......@@ -807,9 +808,9 @@ Color AccessibleBase::getColor( eColorType eColType )
xObjProp->getPropertyValue( aPropName ) >>= nResult;
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......
......@@ -31,6 +31,7 @@
#include <vcl/svapp.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
......@@ -104,9 +105,9 @@ void AccessibleChartElement::InitTextEdit()
aArgs[2] <<= Reference< awt::XWindow >( GetInfo().m_xWindow );
xInit->initialize( aArgs );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......
......@@ -48,6 +48,7 @@
#include <algorithm>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
......@@ -584,9 +585,9 @@ Reference< chart2::XAxis > AxisWrapper::getAxis()
xProp->setPropertyValue("Show", uno::Any( false ) );
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return xAxis;
}
......
......@@ -59,6 +59,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <tools/diagnose_ex.h>
#include <vector>
#include <algorithm>
......@@ -469,9 +470,9 @@ void WrappedHasLegendProperty::setPropertyValue( const Any& rOuterValue, const R
xLegendProp->setPropertyValue("Show", uno::Any( bNewValue ));
}
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -487,9 +488,9 @@ Any WrappedHasLegendProperty::getPropertyValue( const Reference< beans::XPropert
else
aRet <<= false;
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return aRet;
}
......@@ -536,9 +537,9 @@ void WrappedHasMainTitleProperty::setPropertyValue( const Any& rOuterValue, cons
else
TitleHelper::removeTitle( TitleHelper::MAIN_TITLE, m_spChart2ModelContact->getChartModel() );
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -549,9 +550,9 @@ Any WrappedHasMainTitleProperty::getPropertyValue( const Reference< beans::XProp
{
aRet <<= TitleHelper::getTitle( TitleHelper::MAIN_TITLE, m_spChart2ModelContact->getChartModel() ).is();
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return aRet;
}
......@@ -598,9 +599,9 @@ void WrappedHasSubTitleProperty::setPropertyValue( const Any& rOuterValue, const
else
TitleHelper::removeTitle( TitleHelper::SUB_TITLE, m_spChart2ModelContact->getChartModel() );
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -611,9 +612,9 @@ Any WrappedHasSubTitleProperty::getPropertyValue( const Reference< beans::XPrope
{
aRet <<= TitleHelper::getTitle( TitleHelper::SUB_TITLE, m_spChart2ModelContact->getChartModel() ).is();
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return aRet;
}
......@@ -697,9 +698,9 @@ Reference< XDiagram > SAL_CALL ChartDocumentWrapper::getDiagram()
{
m_xDiagram = new DiagramWrapper( m_spChart2ModelContact );
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -731,9 +732,9 @@ void SAL_CALL ChartDocumentWrapper::setDiagram( const Reference< XDiagram >& xDi
m_xDiagram = xDiagram;
}
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......@@ -884,9 +885,9 @@ void SAL_CALL ChartDocumentWrapper::dispose()
// this is ok, don't panic
}
}
catch (const uno::Exception &ex)
catch (const uno::Exception &)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -916,13 +917,13 @@ void ChartDocumentWrapper::impl_resetAddIn()
}
}
}
catch (const uno::RuntimeException& ex)
catch (const uno::RuntimeException&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......@@ -1230,9 +1231,9 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
xResult = static_cast< ::cppu::OWeakObject* >( new DiagramWrapper( m_spChart2ModelContact ));
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -1265,9 +1266,9 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
aArguments[1] <<= true; // bRefreshAddIn
xViewInit->initialize(aArguments);
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......@@ -1370,9 +1371,9 @@ void SAL_CALL ChartDocumentWrapper::setDelegator(
{
dispose();
}
catch (const uno::Exception& ex)
catch (const uno::Exception&)
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......
......@@ -66,6 +66,7 @@
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::chart::wrapper;
......@@ -1467,9 +1468,9 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( uno::Any& rInnerValue ) con
xProp->getPropertyValue( m_aOuterName ) >>= nNumberOfLines;
bHasDetectableInnerValue = true;
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......@@ -1510,9 +1511,9 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con
if( nOldValue == nNewValue )
return;
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
else
......@@ -1537,9 +1538,9 @@ void WrappedNumberOfLinesProperty::setPropertyValue( const Any& rOuterValue, con
xProp->setPropertyValue( "NumberOfLines", uno::Any(nNewValue) );
xTemplate->changeDiagram( xDiagram );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......@@ -1758,9 +1759,9 @@ void WrappedAutomaticSizeProperty::setPropertyValue( const Any& rOuterValue, con
xInnerPropertySet->setPropertyValue( "RelativeSize", Any() );
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......
......@@ -31,6 +31,7 @@
#include <algorithm>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
......@@ -144,9 +145,9 @@ Reference< beans::XPropertySet > GridWrapper::getInnerPropertySet()
sal_Int32 nSubGridIndex = bSubGrid ? 0 : -1;
xRet.set( AxisHelper::getGridProperties( xCooSys , nDimensionIndex, MAIN_AXIS_INDEX, nSubGridIndex ) );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return xRet;
}
......
......@@ -29,6 +29,7 @@
#include <LinePropertiesHelper.hxx>
#include <UserDefinedProperties.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
......@@ -258,9 +259,9 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValues( const uno::Sequence< OUStrin
{
setPropertyValue( aPropertyName, rValueSeq[nN] );
}
catch( const beans::UnknownPropertyException& ex )
catch( const beans::UnknownPropertyException& )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
//todo: store unknown properties elsewhere
......
......@@ -29,6 +29,7 @@
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
#include <UserDefinedProperties.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
......@@ -234,9 +235,9 @@ void SAL_CALL UpDownBarWrapper::setPropertyValues( const uno::Sequence< OUString
{
setPropertyValue( aPropertyName, rValueSeq[nN] );
}
catch( const beans::UnknownPropertyException& ex )
catch( const beans::UnknownPropertyException& )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
//todo: store unknown properties elsewhere
......
......@@ -21,6 +21,7 @@
#include <FastPropertyIdRanges.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
......@@ -64,9 +65,9 @@ void WrappedAutomaticPositionProperty::setPropertyValue( const Any& rOuterValue,
xInnerPropertySet->setPropertyValue( "RelativePosition", Any() );
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......
......@@ -21,6 +21,7 @@
#include <FastPropertyIdRanges.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
......@@ -74,9 +75,9 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R
else
xInnerPropertySet->setPropertyValue( aRefSizeName, Any() );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......
......@@ -24,6 +24,7 @@
#include <ControllerLockGuard.hxx>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
......@@ -91,9 +92,9 @@ void WrappedStockProperty::setPropertyValue( const css::uno::Any& rOuterValue, c
ControllerLockGuardUNO aCtrlLockGuard( m_spChart2ModelContact->getChartModel() );
xTemplate->changeDiagram( xDiagram );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......
......@@ -34,6 +34,7 @@
#include <vcl/graph.hxx>
#include <vcl/GraphicObject.hxx>
#include <vcl/outdev.hxx>
#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
......@@ -429,9 +430,9 @@ beans::PropertyState WrappedSymbolSizeProperty::getPropertyState( const Referenc
return beans::PropertyState_DIRECT_VALUE;
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return beans::PropertyState_DEFAULT_VALUE;
}
......
......@@ -40,6 +40,7 @@
#include <vcl/settings.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <tools/diagnose_ex.h>
namespace chart
{
......@@ -311,9 +312,9 @@ uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTempla
{
setTemplateProperties( xTemplateProps );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
}
......@@ -1201,9 +1202,9 @@ void CombiColumnLineChartDialogController::fillExtraControls( const ChartTypePar
{
xTemplateProps->getPropertyValue( "NumberOfLines" ) >>= nNumLines;
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
if( nNumLines < 0 )
......
......@@ -44,6 +44,7 @@
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <tools/diagnose_ex.h>
#include <rtl/math.hxx>
......@@ -69,9 +70,9 @@ OUString lcl_getRole(
{
xProp->getPropertyValue( "Role" ) >>= aResult;
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
return aResult;
......@@ -117,9 +118,9 @@ bool lcl_SequenceOfSeriesIsShared(
break;
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return bResult;
}
......@@ -954,9 +955,9 @@ void DataBrowserModel::addErrorBarRanges(
++rInOutHeaderEnd;
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......
......@@ -39,6 +39,7 @@
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <comphelper/sequence.hxx>
#include <tools/diagnose_ex.h>
#include <rtl/ustring.hxx>
......@@ -155,9 +156,9 @@ struct lcl_DataSeriesContainerAppend
}
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return *this;
}
......@@ -214,9 +215,9 @@ struct lcl_RolesWithRangeAppend
}
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return *this;
}
......@@ -443,9 +444,9 @@ std::vector< Reference< XDataSeriesContainer > >
}
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return aResult;
......@@ -534,9 +535,9 @@ DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges(
addMissingRoles(aResult, aRoles);
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return aResult;
}
......@@ -591,9 +592,9 @@ Reference< chart2::XDataSeries > DialogModel::insertSeriesAfter(
ThreeDHelper::setScheme( xDiagram, e3DScheme );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return xNewSeries;
}
......@@ -619,9 +620,9 @@ Reference< data::XLabeledDataSequence > DialogModel::getCategories() const
xResult.set( DiagramHelper::getCategoriesFromDiagram( xDiagram ));
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
return xResult;
}
......@@ -684,9 +685,9 @@ void DialogModel::detectArguments(
Reference< frame::XModel >( m_xChartDocument, uno::UNO_QUERY_THROW ),
rOutRangeString, aSequenceMapping, rOutUseColumns, rOutFirstCellAsLabel, rOutHasCategories );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -737,9 +738,9 @@ void DialogModel::setData(
ThreeDHelper::setScheme( xDiagram, e3DScheme );
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......@@ -837,9 +838,9 @@ void DialogModel::applyInterpretedData(
OSL_ASSERT( (*aDestIt).is());
(*aDestIt)->setDataSeries( *aSrcIt );
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
......
......@@ -37,6 +37,7 @@
#include <com/sun/star/chart2/XTitle.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <tools/diagnose_ex.h>
namespace chart
{
......@@ -623,9 +624,9 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
fR*fR, rtl_math_StringFormat_G, 4, cDecSeparator, true ));
}
}
catch( const uno::Exception & ex )
catch( const uno::Exception & )
{
SAL_WARN("chart2", "Exception caught. " << ex );