OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 | 4 |
5 part of dart.core; | 5 part of dart.core; |
6 | 6 |
7 /** | 7 /** |
8 * Error objects thrown in the case of a program failure. | 8 * Error objects thrown in the case of a program failure. |
9 * | 9 * |
10 * An `Error` object represents a program failure that the programmer | 10 * An `Error` object represents a program failure that the programmer |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 /** | 404 /** |
405 * Error thrown when control reaches the end of a switch case. | 405 * Error thrown when control reaches the end of a switch case. |
406 * | 406 * |
407 * The Dart specification requires this error to be thrown when | 407 * The Dart specification requires this error to be thrown when |
408 * control reaches the end of a switch case (except the last case | 408 * control reaches the end of a switch case (except the last case |
409 * of a switch) without meeting a break or similar end of the control | 409 * of a switch) without meeting a break or similar end of the control |
410 * flow. | 410 * flow. |
411 */ | 411 */ |
412 class FallThroughError extends Error { | 412 class FallThroughError extends Error { |
413 FallThroughError(); | 413 FallThroughError(); |
| 414 external FallThroughError._create(String url, int line); |
414 | 415 |
415 external String toString(); | 416 external String toString(); |
416 } | 417 } |
417 | 418 |
418 /** | 419 /** |
419 * Error thrown when trying to instantiate an abstract class. | 420 * Error thrown when trying to instantiate an abstract class. |
420 */ | 421 */ |
421 class AbstractClassInstantiationError extends Error { | 422 class AbstractClassInstantiationError extends Error { |
422 final String _className; | 423 final String _className; |
423 AbstractClassInstantiationError(String className) : _className = className; | 424 AbstractClassInstantiationError(String className) : _className = className; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 : "Reading static variable '$variableName' during its initialization"; | 559 : "Reading static variable '$variableName' during its initialization"; |
559 } | 560 } |
560 | 561 |
561 /// Used by Fasta to throw a compile-time error in a way that is compatible | 562 /// Used by Fasta to throw a compile-time error in a way that is compatible |
562 /// with compile-time constant evaluation. | 563 /// with compile-time constant evaluation. |
563 class _ConstantExpressionError { | 564 class _ConstantExpressionError { |
564 const _ConstantExpressionError(); | 565 const _ConstantExpressionError(); |
565 | 566 |
566 external _throw(error); | 567 external _throw(error); |
567 } | 568 } |
OLD | NEW |