On 04/11/2012 09:20 PM, Abeer Sethi wrote:
I'm attaching the patch for namecont.cxx, I hope this is the correct way
to go about it. If yes, I have another patch ready for another file.
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index a9307d2..4142ef3 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -300,7 +300,7 @@ void SAL_CALL NameContainer::addContainerListener( const
Reference< XContainerLi
throw (RuntimeException)
{
if( !xListener.is() )
- throw RuntimeException();
+ throw RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("XListener is
not equal to 1")), static_cast< cppu::OWeakObject * >(this));
"XListener is not equal to 1" is probably more confusing than no message
at all. ;) Something like "addContainerListener called with null
xListener" might be more useful.
(And, as Christina already pointed out, some very recent changes on
master now make it possible to leave out the
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(...)) boilerplate.)
Stephan
Reference< XInterface > xIface( xListener, UNO_QUERY );
maContainerListeners.addInterface( xIface );
}
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice