Log when opening a file fails

This commit is contained in:
Jesse Talavera-Greenberg 2023-08-12 20:36:22 -04:00
parent f76c778118
commit dae1d500da

View File

@ -98,6 +98,7 @@ Platform::FileHandle *Platform::OpenFile(const std::string& path, FileMode mode,
handle->type = type;
if (!handle->file) {
Log(LogLevel::Error, "Attempted to open %s \"%s\" in FileMode 0x%x, but failed", FileTypeName(type), path.c_str(), mode);
delete handle;
return nullptr;
}