comphelper/source/misc/mimeconfighelper.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 487ce28057656e752dc9bb7eddea5befb446ad0a Author: AhmedHamed <[email protected]> AuthorDate: Thu Feb 22 21:25:04 2024 +0200 Commit: Hossein <[email protected]> CommitDate: Tue Feb 27 23:30:46 2024 +0100 tdf#42982 Improve UNO API error reporting Change-Id: Ia27365b3e5539cdf0f96f01a96bbe58653eb46c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163788 Reviewed-by: Hossein <[email protected]> Tested-by: Jenkins 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; }
