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 |
11 * should have avoided. | 11 * should have avoided. |
12 * | 12 * |
13 * Examples include calling a function with invalid arguments, | 13 * Examples include calling a function with invalid arguments, |
14 * or even with the wrong number of arguments, | 14 * or even with the wrong number of arguments, |
15 * or calling it at a time when it is not allowed. | 15 * or calling it at a time when it is not allowed. |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 * the first time it is read. If evaluating the initializer expression causes | 550 * the first time it is read. If evaluating the initializer expression causes |
551 * another read of the variable, this error is thrown. | 551 * another read of the variable, this error is thrown. |
552 */ | 552 */ |
553 class CyclicInitializationError extends Error { | 553 class CyclicInitializationError extends Error { |
554 final String variableName; | 554 final String variableName; |
555 CyclicInitializationError([this.variableName]); | 555 CyclicInitializationError([this.variableName]); |
556 String toString() => variableName == null | 556 String toString() => variableName == null |
557 ? "Reading static variable during its initialization" | 557 ? "Reading static variable during its initialization" |
558 : "Reading static variable '$variableName' during its initialization"; | 558 : "Reading static variable '$variableName' during its initialization"; |
559 } | 559 } |
OLD | NEW |