tdf#42982 Improve UNO API error reporting

Change-Id: Ia581b91ce0b08ff1117daba691197be555951992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166971
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
Beeram_12 2024-05-01 22:33:06 +05:30 committed by Ilmari Lauhakangas
parent b7a5d0e566
commit 458f5a7e8c

View file

@ -712,7 +712,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
// this is an OOo link, it has no persistence
OUString aURL = xOrigLinkage->getLinkURL();
if ( aURL.isEmpty() )
throw uno::RuntimeException();
throw uno::RuntimeException("URL of the linked object is empty");
// create new linked object from the URL the link is based on
uno::Reference < embed::XEmbeddedObjectCreator > xCreator =
@ -760,7 +760,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
// copy all the properties from xOrigProps to xTargetProps
uno::Reference< beans::XPropertySetInfo > xOrigInfo = xOrigProps->getPropertySetInfo();
if ( !xOrigInfo.is() )
throw uno::RuntimeException();
throw uno::RuntimeException("Object has no properties");
const uno::Sequence< beans::Property > aPropertiesList = xOrigInfo->getProperties();
for ( const auto & p : aPropertiesList )