Closed pwaldhauer closed 8 months ago
Given that it's a CLI, I think it would make sense to have the stack trace by default (after all the reader of CLI output is technical enough to use the CLI). But it would also be fine to hide the stack trace behind a -v|--verbose
flag.
Since Throwable
implements Stringable
, the implementation would just require changing the line to:
$cli->error((string)$e);
Please add this, for instance, I've no clue where "Undefined array key 0" could come from in my code.
CLI.php, Line 98
In my opinion it would be helpful to have a way to have it return the stacktrace instead of only the message. Maybe if the debug mode is enabled or via an extra command line parameter?