summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-09-26 21:58:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-27 09:50:31 +0200
commit960252e129bb72e10790672a5650c0ce24e0f1e0 (patch)
tree2fbd8842a2dd3c1aa88656a83ccd975419985e74 /comphelper
parente0ce9ec1a543d5cbb91d061db067847052bf9c7e (diff)
improve some exception messages
Change-Id: Ifc5d940fbf77ae13071c299fb6168bdc55dc5c95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx2
-rw-r--r--comphelper/source/misc/storagehelper.cxx2
-rw-r--r--comphelper/source/streaming/memorystream.cxx4
-rw-r--r--comphelper/source/streaming/seekableinput.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 92b93a1ff704..944a4dd5b25f 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -88,7 +88,7 @@ const uno::Reference < embed::XStorage >& EmbedImpl::GetReplacements()
}
if ( !mxImageStorage.is() )
- throw io::IOException();
+ throw io::IOException("No ObjectReplacements");
return mxImageStorage;
}
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index c5bff7559f6a..6f86a56484fb 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -218,7 +218,7 @@ void OStorageHelper::SetCommonStorageEncryptionData(
{
uno::Reference< embed::XEncryptionProtectedStorage > xEncrSet( xStorage, uno::UNO_QUERY );
if ( !xEncrSet.is() )
- throw io::IOException(); // TODO
+ throw io::IOException("no XEncryptionProtectedStorage"); // TODO
if ( aEncryptionData.getLength() == 2 &&
aEncryptionData[0].Name == "GpgInfos" &&
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index b275ac34b06e..b8ff86e03b17 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -124,7 +124,7 @@ Reference< XOutputStream > SAL_CALL UNOMemoryStream::getOutputStream( )
sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
{
if( nBytesToRead < 0 )
- throw IOException();
+ throw IOException("nBytesToRead < 0");
nBytesToRead = std::min( nBytesToRead, available() );
aData.realloc( nBytesToRead );
@@ -149,7 +149,7 @@ sal_Int32 SAL_CALL UNOMemoryStream::readSomeBytes( Sequence< sal_Int8 >& aData,
void SAL_CALL UNOMemoryStream::skipBytes( sal_Int32 nBytesToSkip )
{
if( nBytesToSkip < 0 )
- throw IOException();
+ throw IOException("nBytesToSkip < 0");
mnCursor += std::min( nBytesToSkip, available() );
}
diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx
index e4f654043dc7..905e739e85a1 100644
--- a/comphelper/source/streaming/seekableinput.cxx
+++ b/comphelper/source/streaming/seekableinput.cxx
@@ -110,7 +110,7 @@ void OSeekableInputWrapper::PrepareCopy_Impl()
}
if ( !m_xCopyInput.is() )
- throw io::IOException();
+ throw io::IOException("no m_xCopyInput");
}
// XInputStream