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

New commits:
commit 6956e3379b0c7bd8fc9e822fd58a71f038084b6d
Author: Hieronymous <sudk1...@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 <j...@documentfoundation.org>
    Reviewed-by: jan iversen <j...@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) );
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to