shill: Error: Attribute source from PopulateAndLog
Have callers pass the source file/line of PopulateAndLog calls so
the log message can disambiguate the ultimate source of the error.
BUG=chromium:449528
TEST=Unit tests + manual: restart shill and "grep error.cc /var/log/net.log"
Change-Id: I7bb54e966b047025a3ec7ef18acce5b8bed3d031
Reviewed-on: https://chromium-review.googlesource.com/241522
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/dbus_adaptor.cc b/dbus_adaptor.cc
index 9fd845f..f803023 100644
--- a/dbus_adaptor.cc
+++ b/dbus_adaptor.cc
@@ -259,7 +259,7 @@
out->SetStringmap(
key, key_value_pair.second.operator map<string, string>());
} else {
- Error::PopulateAndLog(error, Error::kInternalError,
+ Error::PopulateAndLog(FROM_HERE, error, Error::kInternalError,
"unsupported type for property " + key);
return; // Skip remaining args after error.
}