Skip to content

Don't call sys.exit when failing to find a file #48

@ktbarrett

Description

@ktbarrett

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions