When loading an FST, VCD, or otherwise, if the file can't be found the library calls sys.exit, which is not a great way to handle this kind of error. Better would be to let the FileNotFoundError result from the eval call.
Additionally, when trying to load an FST but not having pylibfst installed, instead of sys.exit, maybe NotImplementedError or ModuleNotFoundError could come from the eval call.
Obviously I don't think anyone wants to see the stacktrace through the evaluator, but an internal exception could unwind the stack and setting an error would save an exception to be raised from the eval call entry point.
When loading an FST, VCD, or otherwise, if the file can't be found the library calls
sys.exit, which is not a great way to handle this kind of error. Better would be to let theFileNotFoundErrorresult from the eval call.Additionally, when trying to load an FST but not having pylibfst installed, instead of
sys.exit, maybeNotImplementedErrororModuleNotFoundErrorcould come from the eval call.Obviously I don't think anyone wants to see the stacktrace through the evaluator, but an internal exception could unwind the stack and setting an error would save an exception to be raised from the eval call entry point.