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

Side by Side Diff: pkg/dev_compiler/lib/src/compiler/command.dart

Issue 2568313002: Implement messages in assert() in dev_compiler. (Closed)
Patch Set: Format. Created 4 years 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 import 'package:analyzer/src/generated/source.dart' show Source; 6 import 'package:analyzer/src/generated/source.dart' show Source;
7 import 'package:analyzer/src/summary/package_bundle_reader.dart' 7 import 'package:analyzer/src/summary/package_bundle_reader.dart'
8 show InSummarySource; 8 show InSummarySource;
9 import 'package:args/args.dart' show ArgParser, ArgResults; 9 import 'package:args/args.dart' show ArgParser, ArgResults;
10 import 'package:args/command_runner.dart' show UsageException; 10 import 'package:args/command_runner.dart' show UsageException;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 _usageException( 202 _usageException(
203 'Imported file "${source.uri}" was not found as a summary or source ' 203 'Imported file "${source.uri}" was not found as a summary or source '
204 'file. Please pass in either the summary or the source file ' 204 'file. Please pass in either the summary or the source file '
205 'for this import.'); 205 'for this import.');
206 return null; // unreachable 206 return null; // unreachable
207 } 207 }
208 208
209 String get _usageMessage => 209 String get _usageMessage =>
210 'Dart Development Compiler compiles Dart into a JavaScript module.' 210 'Dart Development Compiler compiles Dart into a JavaScript module.'
211 '\n\n${_argParser(hide: !_verbose).usage}'; 211 '\n\n${_argParser(hide: !_verbose).usage}';
212 212
213 void _usageException(String message) { 213 void _usageException(String message) {
214 throw new UsageException(message, _usageMessage); 214 throw new UsageException(message, _usageMessage);
215 } 215 }
216 216
217 /// Thrown when the input source code has errors. 217 /// Thrown when the input source code has errors.
218 class CompileErrorException implements Exception { 218 class CompileErrorException implements Exception {
219 toString() => '\nPlease fix all errors before compiling (warnings are okay).'; 219 toString() => '\nPlease fix all errors before compiling (warnings are okay).';
220 } 220 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698