diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-30 17:32:50 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-10-01 18:17:11 +0200 |
commit | 20bae560c05a3df6e7ce8d4b869ed00f951c1e59 (patch) | |
tree | 968607d7c4f33c26302bee6731858c1ed64aa622 /embeddedobj/source/commonembedding | |
parent | ebeff35a0305683574373b75c7b0e5797749fe3e (diff) |
throw more useful uno::Exception's
if we're going to throw the base class of the exception hierarchy,
we can at least put a useful message in there to make the source a little
bit easier to locate.
Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566
Reviewed-on: https://gerrit.libreoffice.org/42968
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r-- | embeddedobj/source/commonembedding/visobj.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 431f871fe492..28df7ed0f583 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -63,7 +63,7 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const changeState( embed::EmbedStates::LOADED ); if ( !bSuccess ) - throw uno::Exception(); // TODO: + throw uno::Exception("SetExtent failed", nullptr); // TODO: } awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) @@ -97,7 +97,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) changeState( embed::EmbedStates::LOADED ); if ( !bSuccess ) - throw uno::Exception(); // TODO: + throw uno::Exception("GetExtent failed", nullptr); // TODO: return aResult; } @@ -136,7 +136,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) changeState( embed::EmbedStates::LOADED ); if ( nResult < 0 ) - throw uno::Exception(); // TODO: + throw uno::Exception("result " + OUString::number(nResult), nullptr); // TODO: return nResult; } |