summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorHieronymous <sudk1896@gmail.com>2016-10-13 17:53:30 +0530
committerjan iversen <jani@documentfoundation.org>2016-10-13 14:01:40 +0000
commit6956e3379b0c7bd8fc9e822fd58a71f038084b6d (patch)
tree2c0b0bba526f9beb1e2501df02ac401c8a4318f0 /basic/source
parentc12e14d19f86be8555f6262d138cf0776f2c9b56 (diff)
Improve UNO error reporting. Make exceptions more descriptive.
Change-Id: I7f7462d2fe2fa29361fd51871bf43bcc5e817944 Reviewed-on: https://gerrit.libreoffice.org/29771 Tested-by: jan iversen <jani@documentfoundation.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/uno/namecont.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index b374fd26e439..566e349c2772 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) );
}