summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2022-11-23 12:49:29 -0800
committer Siarhei Vishniakou <svv@google.com> 2022-11-24 17:46:48 +0000
commit0caeab98806cc1cd5e90d37a4a5cf6299396688d (patch)
treefe4bee4d99e5ae6bce4e14255e500179ffeeed5b
parent1f74ea0d3501bfa87a09ae878455b9e8e37611bf (diff)
Print the text error instead of number
Currently, we just print a number, which is not helpful. Let's print an actual error message instead. Bug: 260115731 Test: m && validatekeymaps input.idc Change-Id: Iad9f4ecd0f9cd847bbc2d4a2e34a64182bced6dc
-rw-r--r--tools/validatekeymaps/Main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp
index 0d7d5f949a08..0fa13b81c4ea 100644
--- a/tools/validatekeymaps/Main.cpp
+++ b/tools/validatekeymaps/Main.cpp
@@ -167,8 +167,8 @@ static bool validateFile(const char* filename) {
android::base::Result<std::unique_ptr<PropertyMap>> propertyMap =
PropertyMap::load(String8(filename));
if (!propertyMap.ok()) {
- error("Error %d parsing input device configuration file.\n\n",
- propertyMap.error().code());
+ error("Error parsing input device configuration file: %s.\n\n",
+ propertyMap.error().message().c_str());
return false;
}
break;