| 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 // Exceptions are thrown either by the VM or from Dart code. | 5 // Exceptions are thrown either by the VM or from Dart code. |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Interface implemented by all core library exceptions. | 8 * Interface implemented by all core library exceptions. |
| 9 * Defaults to an implementation that only carries a simple message. | 9 * Defaults to an implementation that only carries a simple message. |
| 10 */ | 10 */ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 String toString() => "Closure argument mismatch"; | 48 String toString() => "Closure argument mismatch"; |
| 49 } | 49 } |
| 50 | 50 |
| 51 | 51 |
| 52 class ObjectNotClosureException implements Exception { | 52 class ObjectNotClosureException implements Exception { |
| 53 const ObjectNotClosureException(); | 53 const ObjectNotClosureException(); |
| 54 String toString() => "Object is not closure"; | 54 String toString() => "Object is not closure"; |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 class StackOverflowException implements Exception { | |
| 59 const StackOverflowException(); | |
| 60 String toString() => "Stack Overflow"; | |
| 61 } | |
| 62 | |
| 63 | |
| 64 /** | 58 /** |
| 65 * Exception thrown when a string or some other data does not have an expected | 59 * Exception thrown when a string or some other data does not have an expected |
| 66 * format and cannot be parsed or processed. | 60 * format and cannot be parsed or processed. |
| 67 */ | 61 */ |
| 68 class FormatException implements Exception { | 62 class FormatException implements Exception { |
| 69 /** | 63 /** |
| 70 * A message describing the format error. | 64 * A message describing the format error. |
| 71 */ | 65 */ |
| 72 final String message; | 66 final String message; |
| 73 | 67 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 141 } |
| 148 | 142 |
| 149 /** | 143 /** |
| 150 * Exception thrown when a runtime error occurs. | 144 * Exception thrown when a runtime error occurs. |
| 151 */ | 145 */ |
| 152 class RuntimeError implements Exception { | 146 class RuntimeError implements Exception { |
| 153 final message; | 147 final message; |
| 154 RuntimeError(this.message); | 148 RuntimeError(this.message); |
| 155 String toString() => "RuntimeError: $message"; | 149 String toString() => "RuntimeError: $message"; |
| 156 } | 150 } |
| OLD | NEW |