swarm-cli
swarm-cli copied to clipboard
Consolidate error throwing and printing
The global error handler catches and prints all errors in a context-aware way, with an unified design.
However, there are several cases, where errors are caught in the command business logic, and custom error messages are printed, followed by an exit(1) call.
It would be better to re-throw an error in these cases, so that the global error handles takes care of it consistently.
Also make sure global error handler sets exit code to 1