From fd380f0fbbe664c55046ae2cf43180ae76a70e96 Mon Sep 17 00:00:00 2001 From: jiangminsen Date: Sat, 20 May 2023 15:59:28 +0800 Subject: [PATCH] #I76Y03 Signed-off-by: jiangminsen --- frameworks/include/shell_command.h | 2 +- frameworks/src/shell_command.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frameworks/include/shell_command.h b/frameworks/include/shell_command.h index 98a2166..ff4c143 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 842f1b1..5a36e68 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"); } } -- Gitee