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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: dart/pkg/compiler/lib/src/apiimpl.dart
diff --git a/dart/pkg/compiler/lib/src/apiimpl.dart b/dart/pkg/compiler/lib/src/apiimpl.dart
index 8567fb3f6538c995386242e259016304308e035f..a92725e77f1ac2bfdd6e562e7623911a380ec83b 100644
--- a/dart/pkg/compiler/lib/src/apiimpl.dart
+++ b/dart/pkg/compiler/lib/src/apiimpl.dart
@@ -310,8 +310,9 @@ class Compiler extends leg.Compiler {
Uri translatePackageUri(leg.Spannable node, Uri uri) {
if (packageRoot == null) {
- reportFatalError(
+ reportError(
node, leg.MessageKind.PACKAGE_ROOT_NOT_SET, {'uri': uri});
+ 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'
}
return packageRoot.resolve(uri.path);
}

Powered by Google App Engine
This is Rietveld 408576698