diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-30 11:22:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-01 10:23:58 +0000 |
commit | bbd34216dca07bb37b9188147c42e64bbf875d54 (patch) | |
tree | 72e5b3db79e7857983c77b58637ff2c519c5c7e6 /stoc/source/corereflection/crcomp.cxx | |
parent | 2562ad74d1945322e9fdf8af5fc0b1f17e854c9b (diff) |
improve exception messages in stoc
Change-Id: I43716332ab916e5ec7b8ab7a4d14895d060a9bd4
Reviewed-on: https://gerrit.libreoffice.org/33692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/corereflection/crcomp.cxx')
-rw-r--r-- | stoc/source/corereflection/crcomp.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx index 3dd101f2979f..0a0572676a73 100644 --- a/stoc/source/corereflection/crcomp.cxx +++ b/stoc/source/corereflection/crcomp.cxx @@ -189,7 +189,7 @@ Any IdlCompFieldImpl::get( const Any & rObj ) TYPELIB_DANGER_RELEASE( pObjTD ); } throw IllegalArgumentException( - "illegal object given!", + "expected struct or exception, got " + rObj.getValueType().getTypeName(), static_cast<XWeak *>(static_cast<OWeakObject *>(this)), 0 ); } @@ -217,14 +217,14 @@ void IdlCompFieldImpl::set( const Any & rObj, const Any & rValue ) else { throw IllegalArgumentException( - "illegal value given!", + "cannot assign value to destination", static_cast<XWeak *>(static_cast<OWeakObject *>(this)), 1 ); } } TYPELIB_DANGER_RELEASE( pObjTD ); } throw IllegalArgumentException( - "illegal object given!", + "expected struct or exception, got " + rObj.getValueType().getTypeName(), static_cast<XWeak *>(static_cast<OWeakObject *>(this)), 0 ); } @@ -253,14 +253,14 @@ void IdlCompFieldImpl::set( Any & rObj, const Any & rValue ) else { throw IllegalArgumentException( - "illegal value given!", + "cannot assign to destination", static_cast<XWeak *>(static_cast<OWeakObject *>(this)), 1 ); } } TYPELIB_DANGER_RELEASE( pObjTD ); } throw IllegalArgumentException( - "illegal object given!", + "expected struct or exception, got " + rObj.getValueType().getTypeName(), static_cast<XWeak *>(static_cast<OWeakObject *>(this)), 0 ); } |