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

Side by Side Diff: dart/pkg/compiler/lib/src/apiimpl.dart

Issue 791263003: Remove Compiler.reportFatalError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: One more crash revealed. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library leg_apiimpl; 5 library leg_apiimpl;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../compiler.dart' as api; 9 import '../compiler.dart' as api;
10 import 'dart2jslib.dart' as leg; 10 import 'dart2jslib.dart' as leg;
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 303 }
304 304
305 Uri resolvePatchUri(String dartLibraryPath) { 305 Uri resolvePatchUri(String dartLibraryPath) {
306 String patchPath = lookupPatchPath(dartLibraryPath); 306 String patchPath = lookupPatchPath(dartLibraryPath);
307 if (patchPath == null) return null; 307 if (patchPath == null) return null;
308 return libraryRoot.resolve(patchPath); 308 return libraryRoot.resolve(patchPath);
309 } 309 }
310 310
311 Uri translatePackageUri(leg.Spannable node, Uri uri) { 311 Uri translatePackageUri(leg.Spannable node, Uri uri) {
312 if (packageRoot == null) { 312 if (packageRoot == null) {
313 reportFatalError( 313 reportError(
314 node, leg.MessageKind.PACKAGE_ROOT_NOT_SET, {'uri': uri}); 314 node, leg.MessageKind.PACKAGE_ROOT_NOT_SET, {'uri': uri});
315 throw new CompilerCancelledException(null);
Johnni Winther 2015/01/06 08:12:04 Insert a TODO. This shouldn't be fatal, but behave
ahe 2015/01/07 12:55:24 Actually, this is a misuse of the compiler API. I'
315 } 316 }
316 return packageRoot.resolve(uri.path); 317 return packageRoot.resolve(uri.path);
317 } 318 }
318 319
319 Future<bool> run(Uri uri) { 320 Future<bool> run(Uri uri) {
320 log('Allowed library categories: $allowedLibraryCategories'); 321 log('Allowed library categories: $allowedLibraryCategories');
321 return super.run(uri).then((bool success) { 322 return super.run(uri).then((bool success) {
322 int cumulated = 0; 323 int cumulated = 0;
323 for (final task in tasks) { 324 for (final task in tasks) {
324 int elapsed = task.timing; 325 int elapsed = task.timing;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 print('$message: ${tryToString(exception)}'); 385 print('$message: ${tryToString(exception)}');
385 print(tryToString(stackTrace)); 386 print(tryToString(stackTrace));
386 } 387 }
387 388
388 fromEnvironment(String name) => environment[name]; 389 fromEnvironment(String name) => environment[name];
389 390
390 LibraryInfo lookupLibraryInfo(String libraryName) { 391 LibraryInfo lookupLibraryInfo(String libraryName) {
391 return library_info.LIBRARIES[libraryName]; 392 return library_info.LIBRARIES[libraryName];
392 } 393 }
393 } 394 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698