Throw an InvalidOperationException when a mod manifest references a bogus package

Bogus packages are packages that:
  * Cannot be located on disk
  * Are of an unsupported format
This commit is contained in:
Taryn Hill
2017-02-17 08:03:09 -06:00
parent b0cf90e95b
commit 38304bc57b

View File

@@ -121,7 +121,11 @@ namespace OpenRA.FileSystem
modPackages.Add(package);
}
else
{
package = OpenPackage(name);
if (package == null)
throw new InvalidOperationException("Could not open package '{0}', file not found or its format is not supported.".F(name));
}
Mount(package, explicitName);
}