diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-26 14:52:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-26 18:32:25 +0200 |
commit | b56a4eaf5eb856c36d3539dc7d2e6fa94b6551f8 (patch) | |
tree | d37ee64847c6e4eb5f748ef1d180d2651226ec53 /ucbhelper | |
parent | e51a2917ab19156f5a5d2b9474a5a46a52e9e527 (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 'ucbhelper')
-rw-r--r-- | ucbhelper/source/provider/contentinfo.cxx | 2 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultset.cxx | 16 |
2 files changed, 6 insertions, 12 deletions
diff --git a/ucbhelper/source/provider/contentinfo.cxx b/ucbhelper/source/provider/contentinfo.cxx index f5034c2fb2cd..c64bba28212b 100644 --- a/ucbhelper/source/provider/contentinfo.cxx +++ b/ucbhelper/source/provider/contentinfo.cxx @@ -156,7 +156,7 @@ beans::Property SAL_CALL PropertySetInfo::getPropertyByName( if ( queryProperty( aName, aProp ) ) return aProp; - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(aName); } diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx index 6494bb907914..64991e0a4c7c 100644 --- a/ucbhelper/source/provider/resultset.cxx +++ b/ucbhelper/source/provider/resultset.cxx @@ -1245,9 +1245,6 @@ ResultSet::getPropertySetInfo() void SAL_CALL ResultSet::setPropertyValue( const OUString& aPropertyName, const uno::Any& ) { - if ( aPropertyName.isEmpty() ) - throw beans::UnknownPropertyException(); - if ( aPropertyName == "RowCount" ) { // property is read-only. @@ -1260,7 +1257,7 @@ void SAL_CALL ResultSet::setPropertyValue( const OUString& aPropertyName, } else { - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(aPropertyName); } } @@ -1269,9 +1266,6 @@ void SAL_CALL ResultSet::setPropertyValue( const OUString& aPropertyName, uno::Any SAL_CALL ResultSet::getPropertyValue( const OUString& PropertyName ) { - if ( PropertyName.isEmpty() ) - throw beans::UnknownPropertyException(); - uno::Any aValue; if ( PropertyName == "RowCount" ) @@ -1284,7 +1278,7 @@ uno::Any SAL_CALL ResultSet::getPropertyValue( } else { - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(PropertyName); } return aValue; @@ -1303,7 +1297,7 @@ void SAL_CALL ResultSet::addPropertyChangeListener( if ( !aPropertyName.isEmpty() && aPropertyName != "RowCount" && aPropertyName != "IsRowCountFinal" ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(aPropertyName); if ( !m_pImpl->m_pPropertyChangeListeners ) m_pImpl->m_pPropertyChangeListeners.reset( @@ -1324,7 +1318,7 @@ void SAL_CALL ResultSet::removePropertyChangeListener( if ( !aPropertyName.isEmpty() && aPropertyName != "RowCount" && aPropertyName != "IsRowCountFinal" ) - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(aPropertyName); if ( m_pImpl->m_pPropertyChangeListeners ) m_pImpl->m_pPropertyChangeListeners->removeInterface( @@ -1515,7 +1509,7 @@ beans::Property SAL_CALL PropertySetInfo::getPropertyByName( if ( queryProperty( aName, aProp ) ) return aProp; - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(aName); } |