OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 part of dart._runtime; | 4 part of dart._runtime; |
5 | 5 |
6 throwCastError(object, actual, type) => JS('', '''(() => { | 6 throwCastError(object, actual, type) => JS('', '''(() => { |
7 debugger; | 7 debugger; |
8 $throw_(new $CastErrorImplementation($object, | 8 $throw_(new $CastErrorImplementation($object, |
9 $typeName($actual), | 9 $typeName($actual), |
10 $typeName($type))); | 10 $typeName($type))); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 })()'''); | 42 })()'''); |
43 | 43 |
44 throwNullValueError() => JS('', '''(() => { | 44 throwNullValueError() => JS('', '''(() => { |
45 // TODO(vsm): Per spec, we should throw an NSM here. Technically, we ought | 45 // TODO(vsm): Per spec, we should throw an NSM here. Technically, we ought |
46 // to thread through method info, but that uglifies the code and can't | 46 // to thread through method info, but that uglifies the code and can't |
47 // actually be queried ... it only affects how the error is printed. | 47 // actually be queried ... it only affects how the error is printed. |
48 debugger; | 48 debugger; |
49 $throw_(new $NoSuchMethodError(null, | 49 $throw_(new $NoSuchMethodError(null, |
50 new $Symbol('<Unexpected Null Value>'), null, null, null)); | 50 new $Symbol('<Unexpected Null Value>'), null, null, null)); |
51 })()'''); | 51 })()'''); |
| 52 |
| 53 throwNoSuchMethodError(receiver, memberName, positionalArguments, namedArguments
) => '''(() => { |
| 54 debugger; |
| 55 $throw_(new $NoSuchMethodError($receiver, $memberName, $positionalArguments, $
namedArguments)); |
| 56 })()'''); |
OLD | NEW |