summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 14:52:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 18:32:25 +0200
commitb56a4eaf5eb856c36d3539dc7d2e6fa94b6551f8 (patch)
treed37ee64847c6e4eb5f748ef1d180d2651226ec53 /comphelper
parente51a2917ab19156f5a5d2b9474a5a46a52e9e527 (diff)
add property name when throwing css::uno::UnknownPropertyException
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a Reviewed-on: https://gerrit.libreoffice.org/79627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/property/propagg.cxx8
-rw-r--r--comphelper/source/property/propertybag.cxx8
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx2
-rw-r--r--comphelper/source/property/propstate.cxx6
4 files changed, 12 insertions, 12 deletions
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index df8f97d1bbc9..282405c63069 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -143,7 +143,7 @@ Property OPropertyArrayAggregationHelper::getPropertyByName( const OUString& _rP
const Property* pProperty = findPropertyByName( _rPropertyName );
if ( !pProperty )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(_rPropertyName);
return *pProperty;
}
@@ -739,7 +739,7 @@ css::beans::PropertyState SAL_CALL OPropertySetAggregationHelper::getPropertySta
if (nHandle == -1)
{
- throw css::beans::UnknownPropertyException();
+ throw css::beans::UnknownPropertyException(_rPropertyName);
}
OUString aPropName;
@@ -762,7 +762,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyToDefault(const OUString
sal_Int32 nHandle = rPH.getHandleByName(_rPropertyName);
if (nHandle == -1)
{
- throw css::beans::UnknownPropertyException();
+ throw css::beans::UnknownPropertyException(_rPropertyName);
}
OUString aPropName;
@@ -794,7 +794,7 @@ css::uno::Any SAL_CALL OPropertySetAggregationHelper::getPropertyDefault(const O
sal_Int32 nHandle = rPH.getHandleByName( aPropertyName );
if ( nHandle == -1 )
- throw css::beans::UnknownPropertyException();
+ throw css::beans::UnknownPropertyException(aPropertyName);
OUString aPropName;
sal_Int32 nOriginalHandle = -1;
diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx
index 43aeee4276d4..ac8fc17ff1b7 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -169,7 +169,7 @@ namespace comphelper
void PropertyBag::getFastPropertyValue( sal_Int32 _nHandle, Any& _out_rValue ) const
{
if ( !hasPropertyByHandle( _nHandle ) )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(OUString::number(_nHandle));
OPropertyContainerHelper::getFastPropertyValue( _out_rValue, _nHandle );
}
@@ -178,7 +178,7 @@ namespace comphelper
bool PropertyBag::convertFastPropertyValue( sal_Int32 _nHandle, const Any& _rNewValue, Any& _out_rConvertedValue, Any& _out_rCurrentValue ) const
{
if ( !hasPropertyByHandle( _nHandle ) )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(OUString::number(_nHandle));
return const_cast< PropertyBag* >( this )->OPropertyContainerHelper::convertFastPropertyValue(
_out_rConvertedValue, _out_rCurrentValue, _nHandle, _rNewValue );
@@ -188,7 +188,7 @@ namespace comphelper
void PropertyBag::setFastPropertyValue( sal_Int32 _nHandle, const Any& _rValue )
{
if ( !hasPropertyByHandle( _nHandle ) )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(OUString::number(_nHandle));
OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue );
}
@@ -197,7 +197,7 @@ namespace comphelper
void PropertyBag::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _out_rValue ) const
{
if ( !hasPropertyByHandle( _nHandle ) )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(OUString::number(_nHandle));
MapInt2Any::const_iterator pos = m_pImpl->aDefaults.find( _nHandle );
OSL_ENSURE( pos != m_pImpl->aDefaults.end(), "PropertyBag::getPropertyDefaultByHandle: inconsistency!" );
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index 252b3aa8179e..c248a620e1ac 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -93,7 +93,7 @@ void OPropertyContainerHelper::revokeProperty( sal_Int32 _nHandle )
{
PropertiesIterator aPos = searchHandle( _nHandle );
if ( aPos == m_aProperties.end() )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(OUString::number(_nHandle));
m_aProperties.erase( aPos );
}
diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx
index 52085f98e80b..d48a72d094cf 100644
--- a/comphelper/source/property/propstate.cxx
+++ b/comphelper/source/property/propstate.cxx
@@ -80,7 +80,7 @@ namespace comphelper
sal_Int32 nHandle = rPH.getHandleByName(_rsName);
if (nHandle == -1)
- throw css::beans::UnknownPropertyException();
+ throw css::beans::UnknownPropertyException(_rsName);
return getPropertyStateByHandle(nHandle);
}
@@ -92,7 +92,7 @@ namespace comphelper
sal_Int32 nHandle = rPH.getHandleByName(_rsName);
if (nHandle == -1)
- throw css::beans::UnknownPropertyException();
+ throw css::beans::UnknownPropertyException(_rsName);
setPropertyToDefaultByHandle(nHandle);
}
@@ -104,7 +104,7 @@ namespace comphelper
sal_Int32 nHandle = rPH.getHandleByName(_rsName);
if (nHandle == -1)
- throw css::beans::UnknownPropertyException();
+ throw css::beans::UnknownPropertyException(_rsName);
return getPropertyDefaultByHandle(nHandle);
}