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

Unified Diff: tool/input_sdk/private/errors.dart

Issue 1530563003: Generate all runtime files from dart. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged master Created 4 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 | « tool/input_sdk/private/classes.dart ('k') | tool/input_sdk/private/foreign_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/errors.dart
diff --git a/tool/input_sdk/private/errors.dart b/tool/input_sdk/private/errors.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2225ccafdc27a391fbe39571df550977c45d5fc3
--- /dev/null
+++ b/tool/input_sdk/private/errors.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+part of dart._runtime;
+
+throwCastError(actual, type) => JS('', '''(() => {
+ $throw_(new $CastErrorImplementation($actual, $type));
+})()''');
+
+throwAssertionError() => JS('', '''(() => {
+ $throw_(new $AssertionError());
+})()''');
+
+throwNullValueError() => JS('', '''(() => {
+ // TODO(vsm): Per spec, we should throw an NSM here. Technically, we ought
+ // to thread through method info, but that uglifies the code and can't
+ // actually be queried ... it only affects how the error is printed.
+ $throw_(new $NoSuchMethodError(null,
+ new $Symbol('<Unexpected Null Value>'), null, null, null));
+})()''');
« no previous file with comments | « tool/input_sdk/private/classes.dart ('k') | tool/input_sdk/private/foreign_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698