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

Side by Side Diff: tools/gn/builder.cc

Issue 115323009: Fix help and error messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gn/args.cc ('k') | tools/gn/command_args.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/builder.h" 5 #include "tools/gn/builder.h"
6 6
7 #include "tools/gn/config.h" 7 #include "tools/gn/config.h"
8 #include "tools/gn/err.h" 8 #include "tools/gn/err.h"
9 #include "tools/gn/loader.h" 9 #include "tools/gn/loader.h"
10 #include "tools/gn/scheduler.h" 10 #include "tools/gn/scheduler.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 273
274 BuilderRecord* Builder::GetResolvedRecordOfType(const Label& label, 274 BuilderRecord* Builder::GetResolvedRecordOfType(const Label& label,
275 const ParseNode* origin, 275 const ParseNode* origin,
276 BuilderRecord::ItemType type, 276 BuilderRecord::ItemType type,
277 Err* err) { 277 Err* err) {
278 BuilderRecord* record = GetRecord(label); 278 BuilderRecord* record = GetRecord(label);
279 if (!record) { 279 if (!record) {
280 *err = Err(origin, "Item not found", 280 *err = Err(origin, "Item not found",
281 "\"" + label.GetUserVisibleName(false) + "\" doesn't\n" 281 "\"" + label.GetUserVisibleName(false) + "\" doesn't\n"
282 "refer to an existant thing."); 282 "refer to an existent thing.");
283 return NULL; 283 return NULL;
284 } 284 }
285 285
286 const Item* item = record->item(); 286 const Item* item = record->item();
287 if (!item) { 287 if (!item) {
288 *err = Err(origin, "Item not resolved.", 288 *err = Err(origin, "Item not resolved.",
289 "\"" + label.GetUserVisibleName(false) + "\" hasn't been resolved.\n"); 289 "\"" + label.GetUserVisibleName(false) + "\" hasn't been resolved.\n");
290 return NULL; 290 return NULL;
291 } 291 }
292 292
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 // Walk backwards since the dependency arrows point in the reverse direction. 462 // Walk backwards since the dependency arrows point in the reverse direction.
463 std::string ret; 463 std::string ret;
464 for (int i = static_cast<int>(cycle.size()) - 1; i >= 0; i--) { 464 for (int i = static_cast<int>(cycle.size()) - 1; i >= 0; i--) {
465 ret += " " + cycle[i]->label().GetUserVisibleName(false); 465 ret += " " + cycle[i]->label().GetUserVisibleName(false);
466 if (i != 0) 466 if (i != 0)
467 ret += " ->\n"; 467 ret += " ->\n";
468 } 468 }
469 469
470 return ret; 470 return ret;
471 } 471 }
OLDNEW
« no previous file with comments | « tools/gn/args.cc ('k') | tools/gn/command_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698