diff options
author | AhmedHamed <ahmedhamed3699@gmail.com> | 2024-02-22 21:25:04 +0200 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2024-02-27 23:30:46 +0100 |
commit | 487ce28057656e752dc9bb7eddea5befb446ad0a (patch) | |
tree | 17b87d9595ce6b05767899459995ad9bed764b6f /comphelper | |
parent | 971e32c280f2891445d8ec2b57a130962a9c7627 (diff) |
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.cxx | 6 |
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; } |