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() { |