VisionSystemsInc / terra

Terra - Run your algorithm anywhere on earth
MIT License
0 stars 3 forks source link

Added error handling for common terra issues #51

Closed andyneff closed 4 years ago

andyneff commented 4 years ago

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.