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:
kichik 2004-05-08 17:40:29 +00:00
parent 499fa0e764
commit 43cfa19a94
7 changed files with 97 additions and 16 deletions

View file

@ -53,6 +53,22 @@ class CBzip2 : public ICompressor {
return "bzip2";
}
const char* GetErrStr(int err) {
switch (err)
{
case BZ_SEQUENCE_ERROR:
return "sequence error - bad call";
case BZ_PARAM_ERROR:
return "parameter error - bad call";
case BZ_MEM_ERROR:
return "not enough memory";
case BZ_CONFIG_ERROR:
return "config error";
default:
return "unknown error";
}
}
private:
bz_stream *stream;
int last_ret;