Describe the request
Currently all execution of Pharo commands might end up with exception which might be domain specific or not. Error output is polluted with stack-trace information that isn't relevant for printing domain error.
Expected behavior
All domain errors should be printed in nice way (without any stack trace visible).
All non-domain errors will print stack trace.
Exit code should return 1 in both cases (exitFailure).
Expected development cost
Instead of sending top-level execute method on super class of CLI commands, implement new executeHandled that will:
On any domain error will print only relevant one-line information to error output (no stack trace).
On any non-domain error (e.g. bugs in code) will print also stack-trace
On all errors will invoke exitFailure
On successful execution will be exitSuccess invoked (if not already done on framework level of CLAP)
Screenshots
This is example how domain error ends up. It should print just red line (that is relevant).
Working on this right now. There is just one PhLCliCommand>>execute that catches all business exceptions. It calls basicExecute where raising business exceptions are allowed.
Describe the request Currently all execution of Pharo commands might end up with exception which might be domain specific or not. Error output is polluted with stack-trace information that isn't relevant for printing domain error.
Expected behavior All domain errors should be printed in nice way (without any stack trace visible). All non-domain errors will print stack trace. Exit code should return 1 in both cases (exitFailure).
Expected development cost Instead of sending top-level
execute
method on super class of CLI commands, implement newexecuteHandled
that will:exitFailure
exitSuccess
invoked (if not already done on framework level of CLAP)Screenshots This is example how domain error ends up. It should print just red line (that is relevant).
Additional context ...