accessibility/source/extended/accessiblelistboxentry.cxx | 10 +++++----- basic/source/classes/sbxmod.cxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 1fb1f0be10b5d6ce3be5bb364b4c9a8eb0d31b54 Author: Deep17 <deepoose2...@gmail.com> AuthorDate: Sun Mar 6 18:10:46 2022 -0500 Commit: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> CommitDate: Mon Mar 7 21:19:01 2022 +0100 tdf#42982: improve UNO API error reporting Change-Id: I82adf31db09d2157ee8f1c776f33e8a0107c3b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131090 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index be1d98650324..a1e38012dfff 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -554,7 +554,7 @@ namespace accessibility EnsureIsAlive(); SvTreeListEntry* pEntry = m_pTreeListBox->GetEntry( VCLPoint( _aPoint ) ); if ( !pEntry ) - throw RuntimeException(); + throw RuntimeException("AccessibleListBoxEntry::getAccessibleAtPoint - pEntry cannot be empty!"); Reference< XAccessible > xAcc; uno::Reference<XAccessible> xListBox(m_wListBox); @@ -878,7 +878,7 @@ namespace accessibility SvTreeListEntry* pParent = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) - throw RuntimeException(); + throw RuntimeException("AccessibleListBoxEntry::clearAccessibleSelection - pParent cannot be empty!"); sal_Int32 nCount = m_pTreeListBox->GetLevelChildCount( pParent ); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -897,7 +897,7 @@ namespace accessibility SvTreeListEntry* pParent = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) - throw RuntimeException(); + throw RuntimeException("AccessibleListBoxEntry::selectAllAccessibleChildren - pParent cannot be empty!"); sal_Int32 nCount = m_pTreeListBox->GetLevelChildCount( pParent ); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -918,7 +918,7 @@ namespace accessibility SvTreeListEntry* pParent = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) - throw RuntimeException(); + throw RuntimeException("AccessibleListBoxEntry::getSelectedAccessibleChildCount - pParent cannot be empty!"); nCount = m_pTreeListBox->GetLevelChildCount( pParent ); for ( i = 0; i < nCount; ++i ) { @@ -945,7 +945,7 @@ namespace accessibility SvTreeListEntry* pParent = m_pTreeListBox->GetEntryFromPath( m_aEntryPath ); if ( !pParent ) - throw RuntimeException(); + throw RuntimeException("AccessibleListBoxEntry::getSelectedAccessibleChild - pParent cannot be empty!"); nCount = m_pTreeListBox->GetLevelChildCount( pParent ); for ( i = 0; i < nCount; ++i ) { diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index e9502a29aa13..93feaf984d4d 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -198,7 +198,7 @@ DocObjectWrapper::invoke( const OUString& aFunctionName, const Sequence< Any >& return m_xAggInv->invoke( aFunctionName, aParams, aOutParamIndex, aOutParam ); SbMethodRef pMethod = getMethod( aFunctionName ); if ( !pMethod.is() ) - throw RuntimeException(); + throw RuntimeException("DocObjectWrapper::invoke - Could not get the method reference!"); // check number of parameters sal_Int32 nParamsCount = aParams.getLength(); SbxInfo* pInfo = pMethod->GetInfo();