Filesystem cleanup; avoid throwing non-serious exceptions#1977
Open
slipher wants to merge 3 commits into
Open
Conversation
If we couldn't access pakpath files, that should be a fatal error as those are crucial for the engine/game to function. But a file exception can't really happen there anyway since it's just iterating a std::map.
Remove FS_GetFileList, FS_FreeFile, FS_FreeFileList.
This function typically threw exceptions several time during startup, due to checking nonexistent base directories in the gamepath. Use the non-throwing variant of FS::HomePath::ListFiles so that `throw` is not used. This makes it possible to configure a debugger to break on all exceptions and not get tripped up by cases that aren't truly exceptional.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bit of filesystem cleanup. Most importantly, this avoids the throwing of exceptions for things that aren't serious errors. So now you can configure your debugger to break on all exceptions and get only relevant stuff.