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

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

Issue 1144103004: Fix missing print command in a GN error case. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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/commands.h" 5 #include "tools/gn/commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "tools/gn/builder.h" 8 #include "tools/gn/builder.h"
9 #include "tools/gn/filesystem_utils.h" 9 #include "tools/gn/filesystem_utils.h"
10 #include "tools/gn/item.h" 10 #include "tools/gn/item.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 Err(Location(), "Label not found.", 390 Err(Location(), "Label not found.",
391 label.GetUserVisibleName(false) + " not found.").PrintToStdout(); 391 label.GetUserVisibleName(false) + " not found.").PrintToStdout();
392 return nullptr; 392 return nullptr;
393 } 393 }
394 394
395 const Target* target = item->AsTarget(); 395 const Target* target = item->AsTarget();
396 if (!target) { 396 if (!target) {
397 Err(Location(), "Not a target.", 397 Err(Location(), "Not a target.",
398 "The \"" + label.GetUserVisibleName(false) + "\" thing\n" 398 "The \"" + label.GetUserVisibleName(false) + "\" thing\n"
399 "is not a target. Somebody should probably implement this command for " 399 "is not a target. Somebody should probably implement this command for "
400 "other\nitem types."); 400 "other\nitem types.").PrintToStdout();
401 return nullptr; 401 return nullptr;
402 } 402 }
403 403
404 return target; 404 return target;
405 } 405 }
406 406
407 bool ResolveFromCommandLineInput( 407 bool ResolveFromCommandLineInput(
408 Setup* setup, 408 Setup* setup,
409 const std::vector<std::string>& input, 409 const std::vector<std::string>& input,
410 bool all_toolchains, 410 bool all_toolchains,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 481 }
482 } 482 }
483 483
484 void FilterAndPrintTargetSet(bool indent, 484 void FilterAndPrintTargetSet(bool indent,
485 const std::set<const Target*>& targets) { 485 const std::set<const Target*>& targets) {
486 std::vector<const Target*> target_vector(targets.begin(), targets.end()); 486 std::vector<const Target*> target_vector(targets.begin(), targets.end());
487 FilterAndPrintTargets(indent, &target_vector); 487 FilterAndPrintTargets(indent, &target_vector);
488 } 488 }
489 489
490 } // namespace commands 490 } // namespace commands
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698