diff --git a/frameworks/include/shell_command.h b/frameworks/include/shell_command.h index 98a2166c440b249e2fea0779055a37064a82857a..ff4c143ae2107c1460350f1b56cb1f8b89a44531 100644 --- a/frameworks/include/shell_command.h +++ b/frameworks/include/shell_command.h @@ -27,7 +27,7 @@ namespace OHOS { namespace AppExecFwk { namespace { const std::string HELP_MSG_NO_OPTION = "error: you must specify an option at least."; - +const std::string STRING_CODE = "code:"; const int OFFSET_REQUIRED_ARGUMENT = 2; } // namespace diff --git a/frameworks/src/shell_command.cpp b/frameworks/src/shell_command.cpp index 842f1b1b716a6644cc8cff0e9176a2a21d8d4b22..5a36e68c5938bac0596a194eb5067d19fa0cec5d 100644 --- a/frameworks/src/shell_command.cpp +++ b/frameworks/src/shell_command.cpp @@ -114,6 +114,7 @@ std::string ShellCommand::GetMessageFromCode(const int32_t code) const std::string message = messageMap_.at(code); if (message.size() != 0) { + result.append(STRING_CODE + std::to_string(code) + "\n"); result.append(message + "\n"); } }