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@allotropia.de>
Tested-by: Jenkins
diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index 2d5dfbf..04d5b64 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 9655240..77a34c5 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 d7c2493..e72b74eb 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 91fe8d3..455e1b6 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 7776ea8..1276e0e 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);