diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-02-07 10:45:01 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-07 13:00:36 +0100 |
commit | d2c7136158ce4163a03c14621cab26481e5fed96 (patch) | |
tree | 7263c4d95ad5f9e58431ac78e52b7ae4f140850d /svx/source/unodraw/unopage.cxx | |
parent | 961ba62df045473e5793d9e103be86eaad8d9575 (diff) |
Add some messages to SvxDrawPage::getByIndex exceptions
Change-Id: I2310907071d2a8d63d78dbeb99022309870d5c34
Reviewed-on: https://gerrit.libreoffice.org/67489
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/unodraw/unopage.cxx')
-rw-r--r-- | svx/source/unodraw/unopage.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 894f058263a4..bdf97d473321 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -345,14 +345,17 @@ uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index ) SolarMutexGuard aGuard; if( (mpModel == nullptr) || (mpPage == nullptr) ) - throw lang::DisposedException(); + throw lang::DisposedException("Model or Page was already disposed!"); if ( Index < 0 || static_cast<size_t>(Index) >= mpPage->GetObjCount() ) - throw lang::IndexOutOfBoundsException(); + throw lang::IndexOutOfBoundsException("Index (" + OUString::number(Index) + + ") needs to be a positive integer smaller than the shape count (" + + OUString::number(mpPage->GetObjCount()) + ")!"); SdrObject* pObj = mpPage->GetObj( Index ); if( pObj == nullptr ) - throw uno::RuntimeException(); + throw uno::RuntimeException("Runtime exception thrown while getting a ref to the SdrObject at index: " + + OUString::number(Index)); return makeAny(Reference< drawing::XShape >( pObj->getUnoShape(), uno::UNO_QUERY )); |