- file system error management refactoring.

This commit is contained in:
Christoph Oelckers 2023-08-18 20:34:12 +02:00
commit 1dc47f91c2
19 changed files with 288 additions and 152 deletions

View file

@ -168,7 +168,7 @@ struct F7ZLump : public FResourceLump
{
int Position;
virtual int FillCache();
virtual int FillCache() override;
};
@ -340,7 +340,11 @@ F7ZFile::~F7ZFile()
int F7ZLump::FillCache()
{
Cache = new char[LumpSize];
static_cast<F7ZFile*>(Owner)->Archive->Extract(Position, Cache);
SRes code = static_cast<F7ZFile*>(Owner)->Archive->Extract(Position, Cache);
if (code != SZ_OK)
{
throw FileSystemException("Error %d reading from 7z archive", code);
}
RefCount = 1;
return 1;
}