Create graceful errors for Config JSON parsing errors and config file not found.
Some error, we know what is wrong, and a stack trace is not necessary. Furthermore, they are user based errors (Like bad json filename or json malformed) and a stack trace is not needed for the user.
Now, instead of raising an exception when we know the error, and having a nasty backtrace printed out, we can raise SystemExit(terra.core.exceptions.handledExitCode and now Python and Just will not print out a stack. A logger.critical should precede the SystemExit, or else the user will not see what is wrong.
Create graceful errors for Config JSON parsing errors and config file not found.
Some error, we know what is wrong, and a stack trace is not necessary. Furthermore, they are user based errors (Like bad json filename or json malformed) and a stack trace is not needed for the user.
Now, instead of raising an exception when we know the error, and having a nasty backtrace printed out, we can
raise SystemExit(terra.core.exceptions.handledExitCode
and now Python and Just will not print out a stack. Alogger.critical
should precede theSystemExit
, or else the user will not see what is wrong.