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

Unified Diff: dart/site/try/src/interaction_manager.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 | « dart/site/try/src/compilation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/src/interaction_manager.dart
diff --git a/dart/site/try/src/interaction_manager.dart b/dart/site/try/src/interaction_manager.dart
index 8ee2cb3c780ccf82d58602944e10880057ed525d..58915519b68f330f7d49981bbe2c5b1441c3968e 100644
--- a/dart/site/try/src/interaction_manager.dart
+++ b/dart/site/try/src/interaction_manager.dart
@@ -166,7 +166,7 @@ abstract class InteractionManager {
/// Called by [:window.onMessage.listen:].
void onWindowMessage(MessageEvent event);
- void onCompilationFailed();
+ void onCompilationFailed(String firstError);
void onCompilationDone();
@@ -285,7 +285,9 @@ class InteractionContext extends InteractionManager {
void onWindowMessage(MessageEvent event) => state.onWindowMessage(event);
- void onCompilationFailed() => state.onCompilationFailed();
+ void onCompilationFailed(String firstError) {
+ return state.onCompilationFailed(firstError);
+ }
void onCompilationDone() => state.onCompilationDone();
@@ -715,8 +717,12 @@ class InitialState extends InteractionState {
outputDiv.appendText('$line\n');
}
- void onCompilationFailed() {
- consolePrintLine('Compilation failed.');
+ void onCompilationFailed(String firstError) {
+ if (firstError == null) {
+ consolePrintLine('Compilation failed.');
+ } else {
+ consolePrintLine('Compilation failed: $firstError');
+ }
}
void onCompilationDone() {
« no previous file with comments | « dart/site/try/src/compilation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698