summaryrefslogtreecommitdiffstats
path: root/comphelper
diff options
context:
space:
mode:
authorAhmedHamed <ahmedhamed3699@gmail.com>2024-02-22 21:25:04 +0200
committerHossein <hossein@libreoffice.org>2024-02-27 23:30:46 +0100
commit487ce28057656e752dc9bb7eddea5befb446ad0a (patch)
tree17b87d9595ce6b05767899459995ad9bed764b6f /comphelper
parentFix typo (diff)
downloadcore-487ce28057656e752dc9bb7eddea5befb446ad0a.tar.gz
core-487ce28057656e752dc9bb7eddea5befb446ad0a.zip
tdf#42982 Improve UNO API error reporting
Change-Id: Ia27365b3e5539cdf0f96f01a96bbe58653eb46c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163788 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/mimeconfighelper.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index bedd714bab49..41005f3cbcdd 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -44,7 +44,7 @@ MimeConfigurationHelper::MimeConfigurationHelper( uno::Reference< uno::XComponen
: m_xContext(std::move( xContext ))
{
if ( !m_xContext.is() )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("MimeConfigurationHelper:: empty component context");
}
@@ -315,12 +315,12 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfi
{
uno::Sequence< OUString > aVerbShortcuts;
if ( !(xObjectProps->getByName( aObjPropNames[nInd] ) >>= aVerbShortcuts) )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Failed to get verb shortcuts from object properties");
uno::Sequence< embed::VerbDescriptor > aVerbDescriptors( aVerbShortcuts.getLength() );
auto aVerbDescriptorsRange = asNonConstRange(aVerbDescriptors);
for ( sal_Int32 nVerbI = 0; nVerbI < aVerbShortcuts.getLength(); nVerbI++ )
if ( !GetVerbByShortcut( aVerbShortcuts[nVerbI], aVerbDescriptorsRange[nVerbI] ) )
- throw uno::RuntimeException();
+ throw uno::RuntimeException("Failed to get verb descriptor by shortcut");
pResult[nInd+1].Value <<= aVerbDescriptors;
}