Skip to content

handle FileNotFoundError in --outputDir argument #12

@arezaii

Description

@arezaii

It's possible to encounter an uncaught FileNotFoundError if you specify a path to the --outputDir argument with any part of the parent directory structure not yet existing on disk.

Output directory does not exist, creating: (full path)/frontier-2-node-single-HPL-run/outputs
uncaught FileNotFoundError: No such file or directory (in mkdir with path "(full path)/frontier-2-node-single-HPL-run/outputs")

If I had created frontier-2-node-single-HPL-run then there wouldn't be a problem.

This seems like a common error a user could encounter and so handling it makes sense to me for 2 reasons:

  1. we can tailor the error message to the scenario
  2. it makes it look like an expected exception in this case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions