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 "core.dart"; | 5 part of dart.core; |
6 | 6 |
7 // Exceptions are thrown either by the VM or from Dart code. | 7 // Exceptions are thrown either by the VM or from Dart code. |
8 | 8 |
9 /** | 9 /** |
10 * A marker interface implemented by all core library exceptions. | 10 * A marker interface implemented by all core library exceptions. |
11 * | 11 * |
12 * An [Exception] is intended to convey information to the user about a failure, | 12 * An [Exception] is intended to convey information to the user about a failure, |
13 * so that the error can be addressed programmatically. It is intended to be | 13 * so that the error can be addressed programmatically. It is intended to be |
14 * caught, and it should contain useful data fields. | 14 * caught, and it should contain useful data fields. |
15 * | 15 * |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 int markOffset = offset - start + prefix.length; | 170 int markOffset = offset - start + prefix.length; |
171 return "$report$prefix$slice$postfix\n${" " * markOffset}^\n"; | 171 return "$report$prefix$slice$postfix\n${" " * markOffset}^\n"; |
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 // Exception thrown when doing integer division with a zero divisor. | 175 // Exception thrown when doing integer division with a zero divisor. |
176 class IntegerDivisionByZeroException implements Exception { | 176 class IntegerDivisionByZeroException implements Exception { |
177 const IntegerDivisionByZeroException(); | 177 const IntegerDivisionByZeroException(); |
178 String toString() => "IntegerDivisionByZeroException"; | 178 String toString() => "IntegerDivisionByZeroException"; |
179 } | 179 } |
OLD | NEW |