summaryrefslogtreecommitdiff
path: root/stoc/source/servicemanager
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-30 11:22:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 10:23:58 +0000
commitbbd34216dca07bb37b9188147c42e64bbf875d54 (patch)
tree72e5b3db79e7857983c77b58637ff2c519c5c7e6 /stoc/source/servicemanager
parent2562ad74d1945322e9fdf8af5fc0b1f17e854c9b (diff)
improve exception messages in stoc
Change-Id: I43716332ab916e5ec7b8ab7a4d14895d060a9bd4 Reviewed-on: https://gerrit.libreoffice.org/33692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/servicemanager')
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 69ccb3f387b3..eb5685a29b76 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -183,7 +183,7 @@ Any ServiceEnumeration_Impl::nextElement()
{
MutexGuard aGuard( aMutex );
if( nIt == aFactories.getLength() )
- throw NoSuchElementException();
+ throw NoSuchElementException("no more elements");
return Any( &aFactories.getConstArray()[nIt++], cppu::UnoType<XInterface>::get());
}
@@ -266,7 +266,7 @@ Any ImplementationEnumeration_Impl::nextElement()
{
MutexGuard aGuard( aMutex );
if( aIt == aImplementationMap.end() )
- throw NoSuchElementException();
+ throw NoSuchElementException("no more elements");
Any ret( &(*aIt), cppu::UnoType<XInterface>::get());
++aIt;
@@ -744,28 +744,28 @@ void OServiceManager::addPropertyChangeListener(
const OUString&, const Reference<XPropertyChangeListener >&)
{
check_undisposed();
- throw UnknownPropertyException();
+ throw UnknownPropertyException("unsupported");
}
void OServiceManager::removePropertyChangeListener(
const OUString&, const Reference<XPropertyChangeListener >&)
{
check_undisposed();
- throw UnknownPropertyException();
+ throw UnknownPropertyException("unsupported");
}
void OServiceManager::addVetoableChangeListener(
const OUString&, const Reference<XVetoableChangeListener >&)
{
check_undisposed();
- throw UnknownPropertyException();
+ throw UnknownPropertyException("unsupported");
}
void OServiceManager::removeVetoableChangeListener(
const OUString&, const Reference<XVetoableChangeListener >&)
{
check_undisposed();
- throw UnknownPropertyException();
+ throw UnknownPropertyException("unsupported");
}
// OServiceManager
@@ -1061,7 +1061,7 @@ void OServiceManager::insert( const Any & Element )
if( Element.getValueTypeClass() != TypeClass_INTERFACE )
{
throw IllegalArgumentException(
- "no interface given!",
+ "exception interface, got " + Element.getValueType().getTypeName(),
Reference< XInterface >(), 0 );
}
Reference<XInterface > xEle( Element, UNO_QUERY_THROW );
@@ -1134,7 +1134,7 @@ void OServiceManager::remove( const Any & Element )
else
{
throw IllegalArgumentException(
- "neither interface nor string given!",
+ "expected interface or string, got " + Element.getValueType().getTypeName(),
Reference< XInterface >(), 0 );
}
@@ -1148,7 +1148,7 @@ void OServiceManager::remove( const Any & Element )
if( aIt == m_ImplementationMap.end() )
{
throw NoSuchElementException(
- "element is not in!",
+ "element not found",
static_cast< OWeakObject * >(this) );
}
//First remove all factories which have been loaded by ORegistryServiceManager.