From bca1b74c0753f2305a5e234293df88aa3e1d9af0 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 18 Jan 2021 15:05:18 +0200 Subject: improve some IllegalArgumentException messages Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546 Tested-by: Jenkins Reviewed-by: Noel Grandin --- animations/source/animcore/animcore.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'animations') diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 2347dc08a231..ba1f6f7d4231 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -1875,7 +1875,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertBefore( const Referenc Guard< Mutex > aGuard( maMutex ); if( !newChild.is() || !refChild.is() ) - throw IllegalArgumentException(); + throw IllegalArgumentException("no child", static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1899,7 +1899,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::insertAfter( const Reference Guard< Mutex > aGuard( maMutex ); if( !newChild.is() || !refChild.is() ) - throw IllegalArgumentException(); + throw IllegalArgumentException("no child", static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1927,7 +1927,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::replaceChild( const Referenc Guard< Mutex > aGuard( maMutex ); if( !newChild.is() || !oldChild.is() ) - throw IllegalArgumentException(); + throw IllegalArgumentException("no child", static_cast(this), -1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1953,7 +1953,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::removeChild( const Reference Guard< Mutex > aGuard( maMutex ); if( !oldChild.is() ) - throw IllegalArgumentException(); + throw IllegalArgumentException("no child", static_cast(this), 1); auto old = std::find(maChildren.begin(), maChildren.end(), oldChild); if( old == maChildren.end() ) @@ -1973,7 +1973,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference Guard< Mutex > aGuard( maMutex ); if( !newChild.is() ) - throw IllegalArgumentException(); + throw IllegalArgumentException("no child", static_cast(this), 1); if( std::find(maChildren.begin(), maChildren.end(), newChild) != maChildren.end() ) throw ElementExistException(); @@ -1982,7 +1982,7 @@ Reference< XAnimationNode > SAL_CALL AnimationNode::appendChild( const Reference Reference< XInterface > xChild( newChild ); if( xThis == xChild ) - throw IllegalArgumentException(); + throw IllegalArgumentException("cannot append self", static_cast(this), -1); maChildren.push_back( newChild ); -- cgit