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

Side by Side 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: Reverted to new .dart files in input_sdk: please compare them against previous patchset Created 5 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// This library encapsulates the core sdk errors that the runtime knows about.
6
7 library dart._errors;
8 import 'dart:_foreign_helper' show JS, rest;
9 import 'dart:_js_helper' show CastErrorImplementation;
10 import 'dart:_operations' show throw_;
11
12 throwNoSuchMethod(obj, name, pArgs, nArgs, extras) => JS('', '''(() => {
13 $throw_(new $NoSuchMethodError($obj, $name, $pArgs, $nArgs, $extras));
14 })()''');
15
16 throwCastError(actual, type) => JS('', '''(() => {
17 $throw_(new $CastErrorImplementation($actual, $type));
18 })()''');
19
20 throwAssertionError() => JS('', '''(() => {
21 $throw_(new $AssertionError());
22 })()''');
23
24 throwNullValueError() => JS('', '''(() => {
25 // TODO(vsm): Per spec, we should throw an NSM here. Technically, we ought
26 // to thread through method info, but that uglifies the code and can't
27 // actually be queried ... it only affects how the error is printed.
28 $throw_(new $NoSuchMethodError(null,
29 new $Symbol('<Unexpected Null Value>'), null, null, null));
30 })()''');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698