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
This commit is contained in:
committed by
Michael Stahl
parent
694f4e560c
commit
32676270d1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 >(),
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user