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

@ -102,10 +102,10 @@ HRESULT CInTree::Create(UINT32 sizeHistory, UINT32 keepAddBufferBefore,
#ifdef WIN32
_son = (CPair *)::VirtualAlloc(0, (_cyclicBufferSize + 1) * sizeof(CPair), MEM_COMMIT, PAGE_READWRITE);
if (_son == 0)
throw 1; // CNewException();
throw CMemoryException();
_hash = (CIndex *)::VirtualAlloc(0, (size + 1) * sizeof(CIndex), MEM_COMMIT, PAGE_READWRITE);
if (_hash == 0)
throw 1; // CNewException();
throw CMemoryException();
#else
_son = new CPair[_cyclicBufferSize + 1];
_hash = new CIndex[size + 1];

View file

@ -19,4 +19,10 @@ inline int BoolToInt(bool value)
inline bool IntToBool(int value)
{ return (value != 0); }
class CMemoryException
{
public:
CMemoryException() {}
};
#endif