From b762eaba776abde3173a39df3133d1d1b40ccd44 Mon Sep 17 00:00:00 2001 From: Ian Barkley-Yeung Date: Sun, 5 Apr 2020 21:07:04 -0700 Subject: tdf#42982: Improve UNO API error reporting Add more info to the exception in AccessibleIconChoiceCtrl::getAccessibleChild() Change-Id: Ie6e778f76719eb463508647f0367e089ab0ae8ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92514 Tested-by: Jenkins Reviewed-by: Noel Grandin --- accessibility/source/extended/accessibleiconchoicectrl.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'accessibility') diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index 679a6157de0c..f521a235e8d2 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -162,7 +162,10 @@ namespace accessibility VclPtr pCtrl = getCtrl(); SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry(i); if ( !pEntry ) - throw RuntimeException(); + throw RuntimeException("getAccessibleChild: Entry " + + OUString::number(i) + " not found", + static_cast( + static_cast(this))); return new AccessibleIconChoiceCtrlEntry( *pCtrl, i, this ); } -- cgit