summaryrefslogtreecommitdiff
path: root/animations
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 /animations
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 'animations')
-rw-r--r--animations/source/animcore/animcore.cxx12
1 files changed, 6 insertions, 6 deletions
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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(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<cppu::OWeakObject*>(this), -1);
maChildren.push_back( newChild );