Improve the error when remapping to an invalid channel
Maps are proving to be a bit difficult to understand for some users. It
is worth catching some of the common problems and more aggressively
reporting what might have gone wrong.
Change-Id: Ie9d5d62a8843a0d004da8eb4a18f6bbf83b47aa6
diff --git a/aos/configuration.cc b/aos/configuration.cc
index adba7dc..4c11405 100644
--- a/aos/configuration.cc
+++ b/aos/configuration.cc
@@ -641,6 +641,12 @@
} else {
VLOG(1) << "No match for { \"name\": \"" << name << "\", \"type\": \""
<< type << "\" }";
+ if (original_name != name) {
+ LOG(WARNING) << "Remapped from {\"name\": \"" << original_name
+ << "\", \"type\": \"" << type << "\"}, to {\"name\": \""
+ << name << "\", \"type\": \"" << type
+ << "\"}, but no channel by that name exists.";
+ }
return nullptr;
}
}