show meaningful error strings and not just numbers for compression errors
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3545 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
499fa0e764
commit
43cfa19a94
7 changed files with 97 additions and 16 deletions
|
@ -48,6 +48,24 @@ class CZlib : public ICompressor {
|
|||
return "zlib";
|
||||
}
|
||||
|
||||
const char* GetErrStr(int err) {
|
||||
switch (err)
|
||||
{
|
||||
case Z_STREAM_ERROR:
|
||||
return "invalid stream - bad call";
|
||||
case Z_DATA_ERROR:
|
||||
return "data error";
|
||||
case Z_MEM_ERROR:
|
||||
return "not enough memory";
|
||||
case Z_BUF_ERROR:
|
||||
return "buffer error - bad call";
|
||||
case Z_VERSION_ERROR:
|
||||
return "version error";
|
||||
default:
|
||||
return "unknown error";
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
z_stream *stream;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue