sc/source/ui/unoobj/docuno.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit b653556f8dc5a65805a0ef091f654b95caa20a63 Author: Olivier Hallot <olivier.hal...@libreoffice.org> AuthorDate: Sat Mar 25 19:31:24 2023 -0300 Commit: Olivier Hallot <olivier.hal...@libreoffice.org> CommitDate: Mon Mar 27 12:25:32 2023 +0000 Better error msg for sheet insertNewByName() and copyByName() + Indicate where the error occurs, + What are the possible causes, + and what are the possible fixes. Change-Id: I42d4d35ba33a1f5a20a2f0b20724754d8c63a049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149589 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 8f236138b345..39864bfcf5f4 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -3737,7 +3737,7 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const OUString& aName, sal_Int1 bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aName, true, true ); } if (!bDone) - throw uno::RuntimeException(); // no other exceptions specified + throw uno::RuntimeException("ScTableSheetsObj::insertNewByName(): Illegal object name or bad index. Duplicate name?"); // no other exceptions specified } void SAL_CALL ScTableSheetsObj::moveByName( const OUString& aName, sal_Int16 nDestination ) @@ -3779,7 +3779,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const OUString& aName, } } if (!bDone) - throw uno::RuntimeException(); // no other exceptions specified + throw uno::RuntimeException("ScTableSheetsObj::copyByName(): Illegal object name or bad index. Duplicate name?"); // no other exceptions specified } void SAL_CALL ScTableSheetsObj::insertByName( const OUString& aName, const uno::Any& aElement )