Skip to content

Elsa functions don't throw exceptions for errors #75

@samhza

Description

@samhza

Currently none of the Elsa functions (Elsa.stats, Elsa.readFile, etc) throw any exceptions in JS when they encounter errors, they instead print the error and exit with status code 1. There is no way to gracefully handle these errors from the JS code. These functions should throw exceptions instead of exiting so that the script (example below) can catch and handle them.

try {
  Elsa.stats("non-existent");
} catch (error) {
  console.error(error);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriorityPriority task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions