Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intercepts file not found errors for proper errors recovery.
When calling load_ic() and load_script() with incorrect file names, the 2 C++ methods can either return false or call exit(). In the former case, if the user does not check the returned value and continue calling methods on the FGFDMExec instance this can set the Python interpreter in a state of confusion that can only be recovered by quitting the interpreter. In the latter case, an error in the file name simply terminates the Python session (i.e. exit() is called) which is not an appropriate way to raise an error in an interpreter. This commit intercepts the file name errors for load_ic() and load_script() and raises a proper Python exception allowing the user to take the appropriate corrections within a Python interpreter.
- Loading branch information