diff options
author | Jani Saranpää <jani.saranpaa@gmail.com> | 2023-03-22 23:50:16 +0200 |
---|---|---|
committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2023-03-23 06:33:24 +0000 |
commit | 6dfa9c7c0db91a71f3787226636864161d5367ca (patch) | |
tree | bea456bcd7a80423813809b977d363204de73fb1 /embeddedobj | |
parent | b2db6b7586b4e7b7e2c175dbc93fd0ace1cddd97 (diff) |
tdf#42982 Improve UNO API error reporting
Change-Id: If8c8e96c2d8365f10a191868e76e75d6fc7c5db9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149357
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index d06969925109..2bc6cdb6066b 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -217,7 +217,7 @@ uno::Reference< embed::XStorage > OleEmbeddedObject::CreateTemporarySubstorage( if ( !xResult.is() ) { o_aStorageName.clear(); - throw uno::RuntimeException(); + throw uno::RuntimeException("Failed to create temporary storage for OLE embed object"); } return xResult; @@ -238,7 +238,7 @@ OUString OleEmbeddedObject::MoveToTemporarySubstream() } if ( aResult.isEmpty() ) - throw uno::RuntimeException(); + throw uno::RuntimeException("Failed to rename temporary storage for OLE embed object"); return aResult; } @@ -326,7 +326,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& aEmbedFactory = aConfigHelper.GetFactoryNameByMediaType( aMediaType ); if ( aEmbedFactory.isEmpty() ) - throw uno::RuntimeException(); + throw uno::RuntimeException("Failed to get OLE embedded object factory"); uno::Reference< uno::XInterface > xFact = m_xContext->getServiceManager()->createInstanceWithContext( aEmbedFactory, m_xContext ); @@ -858,7 +858,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) try { if ( !m_pOleComponent ) - throw uno::RuntimeException(); + throw uno::RuntimeException("Null reference to OLE component"); // ==== the STAMPIT related solution ============================= m_aVerbExecutionController.StartControlExecution(); |