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

Hieronymous sudk1896 at gmail.com
Thu Oct 13 14:04:59 UTC 2016


 basic/source/uno/namecont.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 6956e3379b0c7bd8fc9e822fd58a71f038084b6d
Author: Hieronymous <sudk1896 at gmail.com>
Date:   Thu Oct 13 17:53:30 2016 +0530

    Improve UNO error reporting. Make exceptions more descriptive.
    
    Change-Id: I7f7462d2fe2fa29361fd51871bf43bcc5e817944
    Reviewed-on: https://gerrit.libreoffice.org/29771
    Tested-by: jan iversen <jani at documentfoundation.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index b374fd2..566e349 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -303,7 +303,7 @@ void SAL_CALL NameContainer::addContainerListener( const Reference< XContainerLi
     if( !xListener.is() )
     {
         throw RuntimeException("addContainerListener called with null xListener",
-                               static_cast< cppu::OWeakObject * >(this));
+                                static_cast< cppu::OWeakObject * >(this));
     }
     maContainerListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) );
 }
@@ -313,7 +313,8 @@ void SAL_CALL NameContainer::removeContainerListener( const Reference< XContaine
 {
     if( !xListener.is() )
     {
-        throw RuntimeException();
+        throw RuntimeException("removeContainerListener called with null xListener",
+                                static_cast< cppu::OWeakObject * >(this));
     }
     maContainerListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
 }
@@ -324,7 +325,8 @@ void SAL_CALL NameContainer::addChangesListener( const Reference< XChangesListen
 {
     if( !xListener.is() )
     {
-        throw RuntimeException();
+        throw RuntimeException("addChangesListener called with null xListener",
+                                static_cast< cppu::OWeakObject * >(this));
     }
     maChangesListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) );
 }
@@ -334,7 +336,8 @@ void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesLis
 {
     if( !xListener.is() )
     {
-        throw RuntimeException();
+        throw RuntimeException("removeChangesListener called with null xListener",
+                                static_cast< cppu::OWeakObject * >(this));
     }
     maChangesListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
 }


More information about the Libreoffice-commits mailing list