Chromium Code Reviews| 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 564 * the first time it is read. If evaluating the initializer expression causes | 564 * the first time it is read. If evaluating the initializer expression causes |
| 565 * another read of the variable, this error is thrown. | 565 * another read of the variable, this error is thrown. |
| 566 */ | 566 */ |
| 567 class CyclicInitializationError extends Error { | 567 class CyclicInitializationError extends Error { |
| 568 final String variableName; | 568 final String variableName; |
| 569 CyclicInitializationError([this.variableName]); | 569 CyclicInitializationError([this.variableName]); |
| 570 String toString() => variableName == null | 570 String toString() => variableName == null |
| 571 ? "Reading static variable during its initialization" | 571 ? "Reading static variable during its initialization" |
| 572 : "Reading static variable '$variableName' during its initialization"; | 572 : "Reading static variable '$variableName' during its initialization"; |
| 573 } | 573 } |
| 574 | |
| 575 | |
| 576 class SyntaxError extends Error { | |
|
Lasse Reichstein Nielsen
2016/09/15 05:41:35
I have two objections here:
1. This will represen
hausner
2016/09/15 21:28:28
Renamed SyntaxError to _CompileTimeError. The clas
| |
| 577 final String errorMsg; | |
| 578 SyntaxError(this.errorMsg); | |
| 579 String toString() => errorMsg; | |
| 580 } | |
| 581 | |
| OLD | NEW |