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 --- basic/source/classes/sbunoobj.cxx | 4 ++-- basic/source/classes/sbxmod.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'basic/source/classes') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 2c668165310c..2834ae87234c 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4204,7 +4204,7 @@ void SAL_CALL ModuleInvocationProxy::setValue(const OUString& rProperty, const A { // TODO: Check vba behavior concerning missing function //StarBASIC::Error( ERRCODE_BASIC_NO_METHOD, aFunctionName ); - throw UnknownPropertyException(); + throw UnknownPropertyException(aPropertyFunctionName); } // Setup parameter @@ -4242,7 +4242,7 @@ Any SAL_CALL ModuleInvocationProxy::getValue(const OUString& rProperty) { // TODO: Check vba behavior concerning missing function //StarBASIC::Error( ERRCODE_BASIC_NO_METHOD, aFunctionName ); - throw UnknownPropertyException(); + throw UnknownPropertyException(aPropertyFunctionName); } // Call method diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 35fdb4bd0937..72811562ac92 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -293,7 +293,7 @@ DocObjectWrapper::setValue( const OUString& aPropertyName, const Any& aValue ) SbPropertyRef pProperty = getProperty( aPropertyName ); if ( !pProperty.is() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(aPropertyName); unoToSbxValue( pProperty.get(), aValue ); } @@ -305,7 +305,7 @@ DocObjectWrapper::getValue( const OUString& aPropertyName ) SbPropertyRef pProperty = getProperty( aPropertyName ); if ( !pProperty.is() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(aPropertyName); SbxVariable* pProp = pProperty.get(); if ( pProp->GetType() == SbxEMPTY ) -- cgit