mirror of
https://github.com/espressif/openthread.git
synced 2026-10-01 21:37:39 +00:00
[cli] prevent ot-ctl termination during debug command (#12600)
Under interactive mode, the `ot-ctl` client treats lines starting with
"Error" as fatal command failures. It exits immediately and stop
receiving CLI output. As the `debug` command runs a sequence of
sub-commands; if one fails , the entire debug session would stop.
This change modifies the error prefix to "ERROR" for internal debug
commands, allowing ot-ctl to continue processing subsequent output.
Also, it adds an explicit `OutputLine("Done")` at the end of the debug
command processing to ensure the CLI client correctly detects the end
of the command.
This commit is contained in:
+3
-1
@@ -164,7 +164,9 @@ void Interpreter::OutputResult(otError aError)
|
|||||||
{
|
{
|
||||||
if (aError != OT_ERROR_NONE)
|
if (aError != OT_ERROR_NONE)
|
||||||
{
|
{
|
||||||
OutputLine("Error %u: %s", aError, otThreadErrorToString(aError));
|
// For internal debug commands, prepending `*` to prevent cli client from treating this as a fatal error and
|
||||||
|
// exit.
|
||||||
|
OutputLine("* Error %u: %s", aError, otThreadErrorToString(aError));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExitNow();
|
ExitNow();
|
||||||
|
|||||||
Reference in New Issue
Block a user