sw/source/core/unocore/unotbl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 6472a50585e31d99774e0dba9259be116d8ac88f Author: ayagamal-tech <[email protected]> AuthorDate: Wed Feb 4 17:13:28 2026 +0200 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Fri Feb 20 16:35:21 2026 +0100 tdf#42982 Improve UNO API error reporting in sw/unotbl.cxx Change-Id: Iab12f941d5611eef5eec37e463c43138b14a73e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198697 Reviewed-by: Ilmari Lauhakangas <[email protected]> Tested-by: Jenkins diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index a48f53fbbc44..26e9e0682cb7 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -910,7 +910,7 @@ sal_Int32 SwXCell::getError() rtl::Reference< SwXTextCursor > SwXCell::createXTextCursor() { if(!m_pStartNode && !IsValid()) - throw uno::RuntimeException(); + throw uno::RuntimeException("Cannot create TextCursor: The table cell is invalid and disposed.", getXWeak()); const SwStartNode* pSttNd = m_pStartNode ? m_pStartNode : m_pBox->GetSttNd(); SwPosition aPos(*pSttNd); rtl::Reference<SwXTextCursor> const pXCursor = @@ -924,7 +924,7 @@ rtl::Reference<SwXTextCursor> SwXCell::createXTextCursorByRange(const uno::Refer { SwUnoInternalPaM aPam(*GetDoc()); if(!::sw::XTextRangeToSwPaM(aPam, xTextPosition)) - throw uno::RuntimeException(); + throw uno::RuntimeException("Cannot create TextCursor by range: The text range is invalid.", getXWeak()); return createXTextCursorByRangeImpl(aPam); } @@ -932,7 +932,7 @@ rtl::Reference< SwXTextCursor > SwXCell::createXTextCursorByRangeImpl( SwUnoInternalPaM& rPam) { if(!m_pStartNode && !IsValid()) - throw uno::RuntimeException(); + throw uno::RuntimeException("Cannot create TextCursor by range: The cell is invalid and disposed.", getXWeak()); const SwStartNode* pSttNd = m_pStartNode ? m_pStartNode : m_pBox->GetSttNd(); // skip sections SwStartNode* p1 = rPam.GetPointNode().StartOfSectionNode();
