| 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; |
| 6 |
| 5 // Exceptions are thrown either by the VM or from Dart code. | 7 // Exceptions are thrown either by the VM or from Dart code. |
| 6 | 8 |
| 7 /** | 9 /** |
| 8 * A marker interface implemented by all core library exceptions. | 10 * A marker interface implemented by all core library exceptions. |
| 9 * | 11 * |
| 10 * 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, |
| 11 * 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 |
| 12 * caught, and it should contain useful data fields. | 14 * caught, and it should contain useful data fields. |
| 13 * | 15 * |
| 14 * Creating instances of [Exception] directly with [:new Exception("message"):] | 16 * Creating instances of [Exception] directly with [:new Exception("message"):] |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 String toString() => "IllegalJSRegExpException: '$_pattern' '$_errmsg'"; | 59 String toString() => "IllegalJSRegExpException: '$_pattern' '$_errmsg'"; |
| 58 final String _pattern; | 60 final String _pattern; |
| 59 final String _errmsg; | 61 final String _errmsg; |
| 60 } | 62 } |
| 61 | 63 |
| 62 | 64 |
| 63 class IntegerDivisionByZeroException implements Exception { | 65 class IntegerDivisionByZeroException implements Exception { |
| 64 const IntegerDivisionByZeroException(); | 66 const IntegerDivisionByZeroException(); |
| 65 String toString() => "IntegerDivisionByZeroException"; | 67 String toString() => "IntegerDivisionByZeroException"; |
| 66 } | 68 } |
| OLD | NEW |