Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Unified Diff: tools/gn/value.cc

Issue 439513003: Improve GN value origins for error messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/parse_tree_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value.cc
diff --git a/tools/gn/value.cc b/tools/gn/value.cc
index b85eb2d83023c3dc07ef1e7d34bb17d544e57777..df072fb8deaab5e8100727b2b6e6a2da950b2f41 100644
--- a/tools/gn/value.cc
+++ b/tools/gn/value.cc
@@ -177,7 +177,10 @@ bool Value::VerifyTypeIs(Type t, Err* err) const {
if (type_ == t)
return true;
- *err = Err(origin(), std::string("This is not a ") + DescribeType(t) + ".");
+ *err = Err(origin(),
+ std::string("This is not a ") + DescribeType(t) + ".",
+ std::string("Instead I see a ") + DescribeType(type_) + " = " +
+ ToString(true));
return false;
}
« no previous file with comments | « tools/gn/parse_tree_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698