[Libreoffice-commits] core.git: svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Feb 7 12:01:02 UTC 2019


 svx/source/unodraw/unopage.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit d2c7136158ce4163a03c14621cab26481e5fed96
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Thu Feb 7 10:45:01 2019 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Feb 7 13:00:36 2019 +0100

    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 at collabora.co.uk>

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 ));


More information about the Libreoffice-commits mailing list