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

Unified Diff: dart/site/try/src/compilation.dart

Issue 388223002: Print the first compile-time error in console. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/site/try/src/interaction_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/src/compilation.dart
diff --git a/dart/site/try/src/compilation.dart b/dart/site/try/src/compilation.dart
index 0fcc7937089ab020dd17cb61b6574183475fd45c..5e2f20594a048afdace4f89245039dbd7435450d 100644
--- a/dart/site/try/src/compilation.dart
+++ b/dart/site/try/src/compilation.dart
@@ -78,6 +78,7 @@ class CompilationProcess {
bool usesDartHtml = false;
Worker worker;
List<String> objectUrls = <String>[];
+ String firstError;
static CompilationProcess current;
@@ -139,7 +140,7 @@ class CompilationProcess {
}
onFail(_) {
- interaction.onCompilationFailed();
+ interaction.onCompilationFailed(firstError);
}
onDone(_) {
@@ -240,6 +241,9 @@ self.importScripts("$url");
interaction.verboseCompilerMessage(message);
return;
}
+ if (kind == 'error' && firstError == null) {
+ firstError = message;
+ }
String uri = diagnostic['uri'];
if (uri != '${PRIVATE_SCHEME}:/main.dart') {
interaction.consolePrintLine('$uri: [$kind] $message');
« no previous file with comments | « no previous file | dart/site/try/src/interaction_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698