feat: add "Unknown error." into ErrorStringEnglish map.

Signed-off-by: TaowerfulMAX <liurantao@huawei.com>
This commit is contained in:
TaowerfulMAX 2024-10-25 12:22:46 +08:00
parent 78ab41ddcc
commit 2f006df974
2 changed files with 2 additions and 3 deletions

View File

@ -934,8 +934,6 @@ string HdcServerForClient::GetErrorString(uint32_t errorCode)
if (map != ErrorStringEnglish.end()) {
return map->second;
}
// default error
string UnknownError = "Unknown error";
return UnknownError;
return ErrorStringEnglish.at(0xFFFFFF); // 0xFFFFFF: Unknown error
}
} // namespace Hdc

View File

@ -78,6 +78,7 @@ private:
{0x002103, "Failed to start the HDC server process!\r\n"
"Please check the HDC server process port is occupied or used as an exception port.\r\n"
"Alternatively, change the OHOS_HDC_SERVER_PORT environment variable and re-run the command."},
{0xFFFFFF, "Unknown error"},
};
};
} // namespace Hdc