[Libreoffice-commits] core.git: embeddedobj/source package/source sfx2/source svl/source xmloff/source

Bayram Çiçek (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 12 18:25:28 UTC 2021


 embeddedobj/source/msole/olepersist.cxx   |    2 +-
 package/source/xstor/owriteablestream.cxx |    2 +-
 sfx2/source/doc/doctemplateslocal.cxx     |    2 +-
 svl/source/fsstor/fsfactory.cxx           |    2 +-
 xmloff/source/meta/xmlversion.cxx         |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 32676270d194b68d7dd811511feb0903876b5c06
Author:     Bayram Çiçek <mail at bayramcicek.com.tr>
AuthorDate: Sun Jan 10 21:47:43 2021 +0000
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Jan 12 19:24:51 2021 +0100

    tdf#42982: Improve UNO API error reporting
    
    Change-Id: I78c6fed4e94f1ebfc772db4dec9955da7230bc3f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109071
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    Tested-by: Jenkins

diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index 2d5dfbf59a4d..04d5b6433c07 100644
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -102,7 +102,7 @@ OUString GetNewTempFileURL_Impl( const uno::Reference< uno::XComponentContext >&
     }
 
     if ( aResult.isEmpty() )
-        throw uno::RuntimeException(); // TODO: can not create tempfile
+        throw uno::RuntimeException("Cannot create tempfile.");
 
     return aResult;
 }
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 9655240c4602..77a34c533653 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -237,7 +237,7 @@ OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext >& rCon
     }
 
     if ( aTempURL.isEmpty() )
-        throw uno::RuntimeException(); // TODO: can not create tempfile
+        throw uno::RuntimeException("Cannot create tempfile.");
 
     return aTempURL;
 }
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index d7c24934f89a..e72b74eb8efe 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -122,7 +122,7 @@ DocTemplLocaleHelper::~DocTemplLocaleHelper()
 std::vector< beans::StringPair > const & DocTemplLocaleHelper::GetParsingResult() const
 {
     if ( !m_aElementsSeq.empty() )
-        throw uno::RuntimeException(); // the parsing has still not finished!
+        throw uno::RuntimeException("The parsing has still not finished!");
 
     return m_aResultSeq;
 }
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index 91fe8d35f983..455e1b6ce590 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -40,7 +40,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance()
     OUString aTempURL = ::utl::TempFile( nullptr, true ).GetURL();
 
     if ( aTempURL.isEmpty() )
-        throw uno::RuntimeException(); // TODO: can not create tempfile
+        throw uno::RuntimeException("Cannot create tempfile.");
 
     ::ucbhelper::Content aResultContent(
         aTempURL, uno::Reference< ucb::XCommandEnvironment >(),
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 7776ea876427..1276e0e6fcdf 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -325,7 +325,7 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt
 
         Reference< io::XOutputStream > xOut = xVerStream->getOutputStream();
         if ( !xOut.is() )
-            throw uno::RuntimeException(); // the stream was successfully opened for writing already
+            throw uno::RuntimeException("The stream was successfully opened for writing already!");
 
         xWriter->setOutputStream(xOut);
 


More information about the Libreoffice-commits mailing list