Improve error reporing of layered streams.

This commit is contained in:
Felix Geyer committed 2015-05-09 23:21:50 +02:00
1 parent f6243675c9
commit cfffdae573
4 files changed
+22 -15

No files matched your search

+2 -1
View File
@@ -147,6 +147,7 @@ bool SymmetricCipherStream::readBlock()
else if (padLength > m_cipher->blockSize()) {
// invalid padding
m_error = true;
setErrorString("Invalid padding.");
return false;
}
else {
@@ -217,7 +218,7 @@ bool SymmetricCipherStream::writeBlock(bool lastBlock)
if (m_baseDevice->write(m_buffer) != m_buffer.size()) {
m_error = true;
// TODO: copy error string
setErrorString(m_cipher->errorString());
return false;
}
else {