From b56a4eaf5eb856c36d3539dc7d2e6fa94b6551f8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 26 Sep 2019 14:52:33 +0200 Subject: 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 --- extensions/source/bibliography/bibload.cxx | 2 +- extensions/source/propctrlr/eventhandler.cxx | 2 +- extensions/source/propctrlr/genericpropertyhandler.cxx | 10 +++++----- extensions/source/propctrlr/propertyhandler.cxx | 4 ++-- extensions/source/update/ui/updatecheckui.cxx | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'extensions') diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 04f2860d3951..dc861bbeb3e3 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -619,7 +619,7 @@ Any BibliographyLoader::getPropertyValue(const OUString& rPropertyName) ISBN_POS //BibliographyDataField_ISBN }; if(rPropertyName != "BibliographyDataFieldNames") - throw UnknownPropertyException(); + throw UnknownPropertyException(rPropertyName); Sequence aSeq(COLUMN_COUNT); PropertyValue* pArray = aSeq.getArray(); BibConfig* pConfig = BibModul::GetConfig(); diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index badaab0d23e7..83bbef32496b 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -996,7 +996,7 @@ namespace pcr { EventMap::const_iterator pos = m_aEvents.find( _rPropertyName ); if ( pos == m_aEvents.end() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); return pos->second; } diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index 40308ba43d8a..c393e3921137 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -338,7 +338,7 @@ namespace pcr { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xComponent.is() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); return m_xComponent->getPropertyValue( _rPropertyName ); } @@ -347,7 +347,7 @@ namespace pcr { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xComponent.is() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); m_xComponent->setPropertyValue( _rPropertyName, _rValue ); } @@ -367,7 +367,7 @@ namespace pcr PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName ); if ( pos == m_aProperties.end() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); Any aPropertyValue; if ( !_rControlValue.hasValue() ) @@ -393,7 +393,7 @@ namespace pcr PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName ); if ( pos == m_aProperties.end() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); Any aControlValue; if ( !_rPropertyValue.hasValue() ) @@ -553,7 +553,7 @@ namespace pcr PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName ); if ( pos == m_aProperties.end() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); LineDescriptor aDescriptor; aDescriptor.DisplayName = _rPropertyName; diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index d261ae48ecbe..c9d021735995 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -290,7 +290,7 @@ namespace pcr FindPropertyByName( _rPropertyName ) ); if ( pFound == m_aSupportedProperties.end() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); return *pFound; } @@ -319,7 +319,7 @@ namespace pcr { PropertyId nPropId = m_pInfoService->getPropertyId( _rPropertyName ); if ( nPropId == -1 ) - throw UnknownPropertyException(); + throw UnknownPropertyException(_rPropertyName); return nPropId; } diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 18fe9599f316..6f510dba8a1a 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -406,7 +406,7 @@ void UpdateCheckUI::setPropertyValue(const OUString& rPropertyName, } } else - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); if ( mbBubbleChanged && mpBubbleWin ) mpBubbleWin->Show( false ); @@ -432,7 +432,7 @@ uno::Any UpdateCheckUI::getPropertyValue(const OUString& rPropertyName) else if( rPropertyName == PROPERTY_SHOW_MENUICON ) aRet <<= mbShowMenuIcon; else - throw beans::UnknownPropertyException(); + throw beans::UnknownPropertyException(rPropertyName); return aRet; } -- cgit