From d819521e10b312901a955f727dc6b214b9c26342 Mon Sep 17 00:00:00 2001 From: Buke Po Date: Tue, 18 Apr 2017 20:31:53 +0800 Subject: [PATCH] print error message on cli failure (#1610) --- src/cli/cli.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 12aa9ace1..64ec2feb3 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -281,15 +281,15 @@ int Interpreter::Hex2Bin(const char *aHex, uint8_t *aBin, uint16_t aBinLength) return static_cast(cur - aBin); } -void Interpreter::AppendResult(ThreadError error) +void Interpreter::AppendResult(ThreadError aError) { - if (error == kThreadError_None) + if (aError == kThreadError_None) { sServer->OutputFormat("Done\r\n"); } else { - sServer->OutputFormat("Error %d\r\n", error); + sServer->OutputFormat("Error %d: %s\r\n", aError, otThreadErrorToString(aError)); } }