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 // 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. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 final String message; | 46 final String message; |
47 | 47 |
48 /** | 48 /** |
49 * Creates a new FormatException with an optional error [message]. | 49 * Creates a new FormatException with an optional error [message]. |
50 */ | 50 */ |
51 const FormatException([this.message = ""]); | 51 const FormatException([this.message = ""]); |
52 | 52 |
53 String toString() => "FormatException: $message"; | 53 String toString() => "FormatException: $message"; |
54 } | 54 } |
55 | 55 |
56 /** | |
57 * Deprecated. Replaced by [FormatException]. | |
58 */ | |
59 @deprecated | |
60 class IllegalJSRegExpException extends FormatException { | |
61 IllegalJSRegExpException(String pattern, String errmsg) | |
62 : super("Illegal pattern: $pattern, $errmsg"); | |
63 } | |
64 | |
65 | |
66 class IntegerDivisionByZeroException implements Exception { | 56 class IntegerDivisionByZeroException implements Exception { |
67 const IntegerDivisionByZeroException(); | 57 const IntegerDivisionByZeroException(); |
68 String toString() => "IntegerDivisionByZeroException"; | 58 String toString() => "IntegerDivisionByZeroException"; |
69 } | 59 } |
OLD | NEW |