summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong2017-06-02 18:13:00 -0500
committerYifan Hong2017-06-02 18:15:17 -0500
commit30470ab76d5f83153b780f5e6f21abf3c8ed5b71 (patch)
tree2bda7c4eba030f607742face870b4d09436f6ae6 /parse_xml.cpp
parent389d0f1bccb4afae410cc35b9a73036307fcc938 (diff)
downloadplatform-system-libvintf-30470ab76d5f83153b780f5e6f21abf3c8ed5b71.tar.gz
platform-system-libvintf-30470ab76d5f83153b780f5e6f21abf3c8ed5b71.tar.xz
platform-system-libvintf-30470ab76d5f83153b780f5e6f21abf3c8ed5b71.zip
Update better error message.
Test: pass Change-Id: I35ca5d6ff1ca3df7bc3b09ef9859b067e5e8f77b Fixes: 62273754
Diffstat (limited to 'parse_xml.cpp')
-rw-r--r--parse_xml.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/parse_xml.cpp b/parse_xml.cpp
index 0ac87cb..557da76 100644
--- a/parse_xml.cpp
+++ b/parse_xml.cpp
@@ -488,7 +488,9 @@ struct MatrixHalConverter : public XmlNodeConverter<MatrixHal> {
488 std::string name{interface.name}; 488 std::string name{interface.name};
489 auto res = object->interfaces.emplace(std::move(name), std::move(interface)); 489 auto res = object->interfaces.emplace(std::move(name), std::move(interface));
490 if (!res.second) { 490 if (!res.second) {
491 this->mLastError = "Duplicated instance entry " + res.first->first; 491 this->mLastError = "Duplicated interface entry \"" + res.first->first +
492 "\"; if additional instances are needed, add them to the "
493 "existing <interface> node.";
492 return false; 494 return false;
493 } 495 }
494 } 496 }
@@ -540,7 +542,9 @@ struct ManifestHalConverter : public XmlNodeConverter<ManifestHal> {
540 auto res = object->interfaces.emplace(interface.name, 542 auto res = object->interfaces.emplace(interface.name,
541 std::move(interface)); 543 std::move(interface));
542 if (!res.second) { 544 if (!res.second) {
543 this->mLastError = "Duplicated instance entry " + res.first->first; 545 this->mLastError = "Duplicated interface entry \"" + res.first->first +
546 "\"; if additional instances are needed, add them to the "
547 "existing <interface> node.";
544 return false; 548 return false;
545 } 549 }
546 } 550 }