summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-18 15:05:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-20 09:03:45 +0100
commitbca1b74c0753f2305a5e234293df88aa3e1d9af0 (patch)
tree16732572c6e15dbd5a2f4e50a2451efc836e3a2d /chart2
parent35a564864e6ce08abfa4924e1ea9314982e7957c (diff)
improve some IllegalArgumentException messages
Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx2
-rw-r--r--chart2/source/model/main/DataSeries.cxx2
-rw-r--r--chart2/source/model/main/Diagram.cxx2
-rw-r--r--chart2/source/model/template/ChartType.cxx2
-rw-r--r--chart2/source/tools/RegressionCurveCalculator.cxx2
5 files changed, 5 insertions, 5 deletions
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index 7075f2ed6f26..f44f565fa86c 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -245,7 +245,7 @@ void SAL_CALL BaseCoordinateSystem::addChartType( const Reference< chart2::XChar
{
if( std::find( m_aChartTypes.begin(), m_aChartTypes.end(), aChartType )
!= m_aChartTypes.end())
- throw lang::IllegalArgumentException();
+ throw lang::IllegalArgumentException("type not found", static_cast<cppu::OWeakObject*>(this), 1);
m_aChartTypes.push_back( aChartType );
ModifyListenerHelper::addListener( aChartType, m_xModifyEventForwarder );
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 5c0ded40cda7..a2f1247ad08e 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -421,7 +421,7 @@ void SAL_CALL DataSeries::addRegressionCurve(
xModifyEventForwarder = m_xModifyEventForwarder;
if( std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve )
!= m_aRegressionCurves.end())
- throw lang::IllegalArgumentException();
+ throw lang::IllegalArgumentException("curve not found", static_cast<cppu::OWeakObject*>(this), 1);
m_aRegressionCurves.push_back( xRegressionCurve );
}
ModifyListenerHelper::addListener( xRegressionCurve, xModifyEventForwarder );
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 0b9efc80f794..f5d8afc5b172 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -479,7 +479,7 @@ void SAL_CALL Diagram::addCoordinateSystem(
MutexGuard aGuard( m_aMutex );
if( std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )
!= m_aCoordSystems.end())
- throw lang::IllegalArgumentException();
+ throw lang::IllegalArgumentException("coordsys not found", static_cast<cppu::OWeakObject*>(this), 1);
if( !m_aCoordSystems.empty() )
{
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 999f7c1ede96..177eb4f1372d 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -124,7 +124,7 @@ void ChartType::impl_addDataSeriesWithoutNotification(
{
if( std::find( m_aDataSeries.begin(), m_aDataSeries.end(), xDataSeries )
!= m_aDataSeries.end())
- throw lang::IllegalArgumentException();
+ throw lang::IllegalArgumentException("dataseries not found", static_cast<cppu::OWeakObject*>(this), 1);
m_aDataSeries.push_back( xDataSeries );
ModifyListenerHelper::addListener( xDataSeries, m_xModifyEventForwarder );
diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx
index 5b65375b0376..ba8a7423c01e 100644
--- a/chart2/source/tools/RegressionCurveCalculator.cxx
+++ b/chart2/source/tools/RegressionCurveCalculator.cxx
@@ -133,7 +133,7 @@ Sequence< geometry::RealPoint2D > SAL_CALL RegressionCurveCalculator::getCurveVa
sal_Bool /* bMaySkipPointsInCalculation */ )
{
if( nPointCount < 2 )
- throw lang::IllegalArgumentException();
+ throw lang::IllegalArgumentException("too few points", static_cast<cppu::OWeakObject*>(this), 2);
// determine if scaling and inverse scaling for x-values work
bool bDoXScaling( xScalingX.is());