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

Unified Diff: dart/pkg/compiler/lib/src/compiler.dart

Issue 848003002: Remove CompilerCancelledException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42861 Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/compiler.dart
diff --git a/dart/pkg/compiler/lib/src/compiler.dart b/dart/pkg/compiler/lib/src/compiler.dart
index 1d31f07dd370437a01102674a56e5ccfa485e8be..c6fc23abdec20b5e700f67a43c99cc5172fead9e 100644
--- a/dart/pkg/compiler/lib/src/compiler.dart
+++ b/dart/pkg/compiler/lib/src/compiler.dart
@@ -752,10 +752,6 @@ abstract class Compiler implements DiagnosticListener {
bool disableInlining = false;
- /// True if compilation was aborted with a [CompilerCancelledException]. Only
- /// set after Future retuned by [run] has completed.
- bool compilerWasCancelled = false;
-
List<Uri> librariesToAnalyzeWhenRun;
Tracer tracer;
@@ -866,8 +862,6 @@ abstract class Compiler implements DiagnosticListener {
}
hasCrashed = true;
rethrow;
- } on CompilerCancelledException catch (ex) {
- rethrow;
} on StackOverflowError catch (ex) {
// We cannot report anything useful in this case, because we
// do not have enough stack space.
@@ -1162,12 +1156,6 @@ abstract class Compiler implements DiagnosticListener {
totalCompileTime.start();
return new Future.sync(() => runCompiler(uri)).catchError((error) {
- if (error is CompilerCancelledException) {
- compilerWasCancelled = true;
- log('Error: $error');
- return false;
- }
-
try {
if (!hasCrashed) {
hasCrashed = true;
@@ -2129,21 +2117,6 @@ class CompilerTask {
}
}
-/// Don't throw this error. It immediately aborts the compiler which causes the
-/// following problems:
-///
-/// 1. No further errors and warnings are reported.
-/// 2. Breaks incremental compilation.
-class CompilerCancelledException extends Error {
- final String reason;
- CompilerCancelledException(this.reason);
-
- String toString() {
- String banner = 'compiler cancelled';
- return (reason != null) ? '$banner: $reason' : '$banner';
- }
-}
-
class SourceSpan implements Spannable {
final Uri uri;
final int begin;
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698