summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarshneydevansh <varshney.devansh614@gmail.com>2024-01-07 22:52:07 +0530
committerHossein <hossein@libreoffice.org>2024-03-10 23:40:21 +0100
commitcc695e180b39ffe21f0ae12cfeefb89a50a50b64 (patch)
treedb6211df0316ebe4550be55e5a518af80dac9dd3
parent9561465c43da93bee0f259fe57748785ac1cb8b5 (diff)
tdf#42982: Improve UNO API error reporting
Change-Id: I2eead2d6907cf49d9a8525065d33c3ef43207660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161779 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
-rw-r--r--embeddedobj/source/general/docholder.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index 08ad9cfdd271..d0bbc659ca2c 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -544,7 +544,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl()
}
if ( !xResult.is() )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Unable to retrive the UI configuration menu.", getXWeak());
return xResult;
}
@@ -569,7 +569,7 @@ void DocumentHolder::FindConnectPoints(
}
if ( aCommand.isEmpty() )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("CommandURL is empty at index: " + OUString::number(nInd), xMenu);
if ( aCommand == ".uno:PickList" )
nConnectPoints[0] = nInd;
@@ -638,7 +638,7 @@ bool DocumentHolder::MergeMenus_Impl( const uno::Reference< css::frame::XLayoutM
uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xContMenu = xUISettings->getSettings( true );
if ( !xContMenu.is() )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Unable to merge the menu", getXWeak());
uno::Reference< container::XIndexAccess > xOwnMenu = RetrieveOwnMenu_Impl();
uno::Reference< frame::XDispatchProvider > xOwnDisp( m_xFrame, uno::UNO_QUERY_THROW );