summaryrefslogtreecommitdiff
path: root/ucb
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 /ucb
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 'ucb')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx5
-rw-r--r--ucb/source/cacher/contentresultsetwrapper.cxx2
-rw-r--r--ucb/source/core/ucbprops.cxx2
-rw-r--r--ucb/source/core/ucbstore.cxx16
-rw-r--r--ucb/source/sorter/sortresult.cxx6
-rw-r--r--ucb/source/ucp/file/bc.cxx2
-rw-r--r--ucb/source/ucp/file/filprp.cxx8
-rw-r--r--ucb/source/ucp/file/filrset.cxx8
-rw-r--r--ucb/source/ucp/file/filtask.cxx2
-rw-r--r--ucb/source/ucp/file/prov.cxx6
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetbase.cxx10
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx2
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx2
13 files changed, 28 insertions, 43 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 830d76c0129a..15f35adcfea1 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -533,14 +533,11 @@ Sequence< Property > SAL_CALL CCRS_PropertySetInfo
Property SAL_CALL CCRS_PropertySetInfo
::getPropertyByName( const OUString& aName )
{
- if ( aName.isEmpty() )
- throw UnknownPropertyException();
-
Property aProp;
if ( impl_queryProperty( aName, aProp ) )
return aProp;
- throw UnknownPropertyException();
+ throw UnknownPropertyException(aName);
}
//virtual
diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx
index 99ffd1433364..567fe6328d7c 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -685,7 +685,7 @@ void SAL_CALL ContentResultSetWrapper::removeVetoableChangeListener( const OUStr
if( !rPropertyName.isEmpty() )
{
if( !getPropertySetInfo().is() )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(rPropertyName);
m_xPropertySetInfo->getPropertyByName( rPropertyName );
//throws UnknownPropertyException, if so
diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx
index b2aadcec33b0..626951211b63 100644
--- a/ucb/source/core/ucbprops.cxx
+++ b/ucb/source/core/ucbprops.cxx
@@ -231,7 +231,7 @@ Property SAL_CALL UcbPropertiesManager::getPropertyByName( const OUString& aName
if ( queryProperty( aName, aProp ) )
return aProp;
- throw UnknownPropertyException();
+ throw UnknownPropertyException(aName);
}
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 61cd104a58c8..02ef9a4f8241 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1184,9 +1184,6 @@ Reference< XPropertySetInfo > SAL_CALL PersistentPropertySet::getPropertySetInfo
void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aPropertyName,
const Any& aValue )
{
- if ( aPropertyName.isEmpty() )
- throw UnknownPropertyException();
-
osl::ClearableGuard< osl::Mutex > aCGuard( m_pImpl->m_aMutex );
Reference< XHierarchicalNameAccess > xRootHierNameAccess(
@@ -1277,7 +1274,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty
}
}
- throw UnknownPropertyException();
+ throw UnknownPropertyException(aPropertyName);
}
@@ -1285,9 +1282,6 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty
Any SAL_CALL PersistentPropertySet::getPropertyValue(
const OUString& PropertyName )
{
- if ( PropertyName.isEmpty() )
- throw UnknownPropertyException();
-
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
Reference< XHierarchicalNameAccess > xNameAccess(
@@ -1304,11 +1298,11 @@ Any SAL_CALL PersistentPropertySet::getPropertyValue(
}
catch (const NoSuchElementException&)
{
- throw UnknownPropertyException();
+ throw UnknownPropertyException(aFullPropName);
}
}
- throw UnknownPropertyException();
+ throw UnknownPropertyException(PropertyName);
}
@@ -1581,7 +1575,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
// Property in set?
if ( !xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(aFullPropName);
// Property removable?
try
@@ -2237,7 +2231,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
// Does property exist?
if ( !xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) )
- throw UnknownPropertyException();
+ throw UnknownPropertyException(aFullPropName);
try
{
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 3aa745d290fe..54536c883eb3 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -771,7 +771,7 @@ void SAL_CALL SortedResultSet::setPropertyValue(
if ( PropertyName == "RowCount" || PropertyName == "IsRowCountFinal" )
throw IllegalArgumentException();
else
- throw UnknownPropertyException();
+ throw UnknownPropertyException(PropertyName);
}
@@ -807,7 +807,7 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName )
}
}
else
- throw UnknownPropertyException();
+ throw UnknownPropertyException(PropertyName);
return aRet;
}
@@ -1796,7 +1796,7 @@ SRSPropertySetInfo::getPropertyByName( const OUString& Name )
else if ( Name == "IsRowCountFinal" )
return maProps[1];
else
- throw UnknownPropertyException();
+ throw UnknownPropertyException(Name);
}
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 7bc6e9d1d93a..bbe5bf79c2e1 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -537,7 +537,7 @@ BaseContent::removeProperty( const OUString& Name )
{
if( m_nState & Deleted )
- throw beans::UnknownPropertyException( THROW_WHERE );
+ throw beans::UnknownPropertyException( Name );
m_pMyShell->deassociate( m_aUncPath, Name );
}
diff --git a/ucb/source/ucp/file/filprp.cxx b/ucb/source/ucp/file/filprp.cxx
index 400513035964..0110be272759 100644
--- a/ucb/source/ucp/file/filprp.cxx
+++ b/ucb/source/ucp/file/filprp.cxx
@@ -30,12 +30,6 @@ using namespace com::sun::star::ucb;
#include "filinl.hxx"
-#if OSL_DEBUG_LEVEL > 0
-#define THROW_WHERE SAL_WHERE
-#else
-#define THROW_WHERE ""
-#endif
-
XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUString& aUnqPath )
: m_pMyShell( pMyShell ),
m_seq( 0 )
@@ -81,7 +75,7 @@ XPropertySetInfo_impl::getPropertyByName( const OUString& aName )
if (pProp != m_seq.end())
return *pProp;
- throw beans::UnknownPropertyException( THROW_WHERE );
+ throw beans::UnknownPropertyException( aName );
}
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 770d3d38d988..90c9646e8dbb 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -641,7 +641,7 @@ void SAL_CALL XResultSet_impl::setPropertyValue(
if( aPropertyName == "IsRowCountFinal" ||
aPropertyName == "RowCount" )
return;
- throw beans::UnknownPropertyException( THROW_WHERE );
+ throw beans::UnknownPropertyException( aPropertyName );
}
@@ -658,7 +658,7 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue(
return uno::Any(count);
}
else
- throw beans::UnknownPropertyException( THROW_WHERE );
+ throw beans::UnknownPropertyException( PropertyName );
}
@@ -684,7 +684,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener(
m_pRowCountListeners->addInterface( xListener );
}
else
- throw beans::UnknownPropertyException( THROW_WHERE );
+ throw beans::UnknownPropertyException( aPropertyName );
}
@@ -706,7 +706,7 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener(
m_pRowCountListeners->removeInterface( aListener );
}
else
- throw beans::UnknownPropertyException( THROW_WHERE );
+ throw beans::UnknownPropertyException( aPropertyName );
}
void SAL_CALL XResultSet_impl::addVetoableChangeListener(
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 3e3afd149c5a..7a56539d276e 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -590,7 +590,7 @@ TaskManager::deassociate( const OUString& aUnqPath,
it1 = properties.find( oldProperty );
if( it1 == properties.end() )
- throw beans::UnknownPropertyException( THROW_WHERE );
+ throw beans::UnknownPropertyException( PropertyName );
properties.erase( it1 );
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index c222655f4b73..eac7d2b3b01b 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -351,7 +351,7 @@ XPropertySetInfoImpl2::getPropertyByName( const OUString& aName )
if (pProp != m_seq.end())
return *pProp;
- throw UnknownPropertyException( THROW_WHERE );
+ throw UnknownPropertyException( aName );
}
@@ -416,7 +416,7 @@ FileProvider::setPropertyValue( const OUString& aPropertyName,
if( !(aPropertyName == "FileSystemNotation" ||
aPropertyName == "HomeDirectory" ||
aPropertyName == "HostName") )
- throw UnknownPropertyException( THROW_WHERE );
+ throw UnknownPropertyException( aPropertyName );
}
@@ -438,7 +438,7 @@ FileProvider::getPropertyValue(
return Any(m_HostName);
}
else
- throw UnknownPropertyException( THROW_WHERE );
+ throw UnknownPropertyException( aPropertyName );
}
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
index e18e14212103..69acdf6fcf8a 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -380,7 +380,7 @@ public:
[&aName](const beans::Property& rProp) { return aName == rProp.Name; });
if (pProp != m_aSeq.end())
return *pProp;
- throw beans::UnknownPropertyException();
+ throw beans::UnknownPropertyException(aName);
}
sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override
@@ -423,7 +423,7 @@ void SAL_CALL ResultSetBase::setPropertyValue(
aPropertyName == "RowCount" )
return;
- throw beans::UnknownPropertyException();
+ throw beans::UnknownPropertyException(aPropertyName);
}
@@ -440,7 +440,7 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue(
return uno::Any(count);
}
else
- throw beans::UnknownPropertyException();
+ throw beans::UnknownPropertyException(PropertyName);
}
@@ -466,7 +466,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener(
m_pRowCountListeners->addInterface( xListener );
}
else
- throw beans::UnknownPropertyException();
+ throw beans::UnknownPropertyException(aPropertyName);
}
@@ -487,7 +487,7 @@ void SAL_CALL ResultSetBase::removePropertyChangeListener(
m_pRowCountListeners->removeInterface( aListener );
}
else
- throw beans::UnknownPropertyException();
+ throw beans::UnknownPropertyException(aPropertyName);
}
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 81e2e8c19655..71b62e3e1925 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1009,7 +1009,7 @@ void Content::removeProperty( const OUString& Name,
{
case UNKNOWN:
case DAV:
- throw beans::UnknownPropertyException();
+ throw beans::UnknownPropertyException(Name);
case FTP:
case NON_DAV:
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index e880695656d0..dfa53473e27f 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -983,7 +983,7 @@ void Content::removeProperty( const OUString& Name,
{
case UNKNOWN:
case DAV:
- throw beans::UnknownPropertyException();
+ throw beans::UnknownPropertyException(Name);
case NON_DAV:
// Try to remove property from local store.