- tweak: error cleanup

This commit is contained in:
2025-01-19 22:52:29 +03:00
parent 46d17b98b2
commit 19de47bacf
9 changed files with 29 additions and 71 deletions

View File

@@ -84,7 +84,7 @@ public sealed class EngineService
var api = _fileService.OpenZip(version, _fileService.EngineFileApi);
if (api != null) return _assemblyService.Mount(api);
}
catch (Exception e)
catch (Exception)
{
_fileService.EngineFileApi.Remove(version);
throw;
@@ -164,9 +164,9 @@ public sealed class EngineService
try
{
return _assemblyService.Mount(_fileService.OpenZip(fileName, _fileService.EngineFileApi));
return _assemblyService.Mount(_fileService.OpenZip(fileName, _fileService.EngineFileApi) ?? throw new InvalidOperationException($"{fileName} is not exist!"));
}
catch (Exception e)
catch (Exception)
{
_fileService.EngineFileApi.Remove(fileName);
throw;