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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart

Issue 2519873004: Set auto breakpoint at various errors (Closed)
Patch Set: Reland Created 4 years, 1 month 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
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();
Jennifer Messerly 2016/11/21 22:16:05 since you're already in a JS literal, you don't ne
vsm 2016/11/21 22:39:25 Done.
7 $throw_(new $CastErrorImplementation($object, 8 $throw_(new $CastErrorImplementation($object,
8 $typeName($actual), 9 $typeName($actual),
9 $typeName($type))); 10 $typeName($type)));
10 })()'''); 11 })()''');
11 12
12 throwTypeError(object, actual, type) => JS('', '''(() => { 13 throwTypeError(object, actual, type) => JS('', '''(() => {
14 $debugger();
Jennifer Messerly 2016/11/21 22:16:05 same for the rest of these
vsm 2016/11/21 22:39:25 Done.
13 $throw_(new $TypeErrorImplementation($object, 15 $throw_(new $TypeErrorImplementation($object,
14 $typeName($actual), 16 $typeName($actual),
15 $typeName($type))); 17 $typeName($type)));
16 })()'''); 18 })()''');
17 19
18 throwStrongModeCastError(object, actual, type) => JS('', '''(() => { 20 throwStrongModeCastError(object, actual, type) => JS('', '''(() => {
21 $debugger();
19 $throw_(new $StrongModeCastError($object, 22 $throw_(new $StrongModeCastError($object,
20 $typeName($actual), 23 $typeName($actual),
21 $typeName($type))); 24 $typeName($type)));
22 })()'''); 25 })()''');
23 26
24 throwStrongModeTypeError(object, actual, type) => JS('', '''(() => { 27 throwStrongModeTypeError(object, actual, type) => JS('', '''(() => {
28 $debugger();
25 $throw_(new $StrongModeTypeError($object, 29 $throw_(new $StrongModeTypeError($object,
26 $typeName($actual), 30 $typeName($actual),
27 $typeName($type))); 31 $typeName($type)));
28 })()'''); 32 })()''');
29 33
30 throwUnimplementedError(message) => JS('', '''(() => { 34 throwUnimplementedError(message) => JS('', '''(() => {
35 $debugger();
31 $throw_(new $UnimplementedError($message)); 36 $throw_(new $UnimplementedError($message));
32 })()'''); 37 })()''');
33 38
34 throwAssertionError() => JS('', '''(() => { 39 throwAssertionError() => JS('', '''(() => {
40 $debugger();
35 $throw_(new $AssertionError()); 41 $throw_(new $AssertionError());
36 })()'''); 42 })()''');
37 43
38 throwNullValueError() => JS('', '''(() => { 44 throwNullValueError() => JS('', '''(() => {
39 // 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
40 // 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
41 // 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();
42 $throw_(new $NoSuchMethodError(null, 49 $throw_(new $NoSuchMethodError(null,
43 new $Symbol('<Unexpected Null Value>'), null, null, null)); 50 new $Symbol('<Unexpected Null Value>'), null, null, null));
44 })()'''); 51 })()''');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698