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.
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.