Given code like this where the file doesn't exist:
try {
PhysFS::ifstream file ("filename.txt");
} catch (std::invalid_argument e) {
//do something here
}
A bad access error will crash the program.
If I remove the exception handling, then it correctly shows the unhanded exception of:
throw std::invalid_argument("file not found: " + std::string(filename));
Given code like this where the file doesn't exist:
A bad access error will crash the program.
If I remove the exception handling, then it correctly shows the unhanded exception of: