1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

A bit improved error reporting for checksum calculation.

This commit is contained in:
Ivan Savenko
2013-11-10 13:43:55 +00:00
parent 1657f124e1
commit f691061d94
3 changed files with 7 additions and 3 deletions

View File

@@ -149,7 +149,10 @@ si64 CCompressedStream::readMore(ui8 *data, si64 size)
endLoop = true;
break;
default:
throw std::runtime_error("Decompression error!\n");
if (inflateState->msg == nullptr)
throw std::runtime_error("Decompression error. Return code was " + boost::lexical_cast<std::string>(ret));
else
throw std::runtime_error(std::string("Decompression error: ") + inflateState->msg);
}
}
while (endLoop == false && inflateState->avail_out != 0 );