Index: dart/sdk/lib/_internal/lib/js_helper.dart |
diff --git a/dart/sdk/lib/_internal/lib/js_helper.dart b/dart/sdk/lib/_internal/lib/js_helper.dart |
index 37f016ecd5b06115c38d0f2252ce81087bdb0840..41fc90290ba6473228d240af3af2bd2fc1d6684b 100644 |
--- a/dart/sdk/lib/_internal/lib/js_helper.dart |
+++ b/dart/sdk/lib/_internal/lib/js_helper.dart |
@@ -3330,3 +3330,23 @@ Future<Null> _loadHunk(String hunkName, String uri) { |
return completer.future; |
}); |
} |
+ |
+class MainError extends Error implements NoSuchMethodError { |
+ final String _message; |
+ |
+ MainError(this._message); |
+ |
+ String toString() => 'NoSuchMethodError: $_message'; |
+} |
+ |
+void missingMain() { |
+ throw new MainError("No top-level function named 'main'."); |
+} |
+ |
+void badMain() { |
+ throw new MainError("'main' is not a function."); |
+} |
+ |
+void mainHasTooManyParameters() { |
+ throw new MainError("'main' expects too many parameters."); |
+} |