Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: corelib/src/exceptions.dart

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | corelib/src/math.dart » ('j') | tests/co19/co19-runtime.status » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 */ 9 */
10 interface Exception default ExceptionImplementation { 10 interface Exception default ExceptionImplementation {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 String toString() => "Out of Memory"; 103 String toString() => "Out of Memory";
104 } 104 }
105 105
106 106
107 class StackOverflowException implements Exception { 107 class StackOverflowException implements Exception {
108 const StackOverflowException(); 108 const StackOverflowException();
109 String toString() => "Stack Overflow"; 109 String toString() => "Stack Overflow";
110 } 110 }
111 111
112 112
113 class BadNumberFormatException implements Exception { 113 /**
114 const BadNumberFormatException(String this._s); 114 * Exception thrown when a string or some other data does not have an expected
115 String toString() => "BadNumberFormatException: '$_s'"; 115 * format and cannot be parsed or processed.
116 */
117 class FormatException implements Exception {
118 const FormatException(String this._s);
kasperl 2012/08/03 05:25:19 There's no need to explicitly type the constructor
Bob Nystrom 2012/08/03 17:46:54 Done and good call. After I sent this out, I reali
119 String toString() => "FormatException: '$_s'";
116 final String _s; 120 final String _s;
117 } 121 }
118 122
119 123
120 class WrongArgumentCountException implements Exception { 124 class WrongArgumentCountException implements Exception {
121 const WrongArgumentCountException(); 125 const WrongArgumentCountException();
122 String toString() => "WrongArgumentCountException"; 126 String toString() => "WrongArgumentCountException";
123 } 127 }
124 128
125 129
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 String toString() => "IllegalJSRegExpException: '$_pattern' '$_errmsg'"; 179 String toString() => "IllegalJSRegExpException: '$_pattern' '$_errmsg'";
176 final String _pattern; 180 final String _pattern;
177 final String _errmsg; 181 final String _errmsg;
178 } 182 }
179 183
180 184
181 class IntegerDivisionByZeroException implements Exception { 185 class IntegerDivisionByZeroException implements Exception {
182 const IntegerDivisionByZeroException(); 186 const IntegerDivisionByZeroException();
183 String toString() => "IntegerDivisionByZeroException"; 187 String toString() => "IntegerDivisionByZeroException";
184 } 188 }
OLDNEW
« no previous file with comments | « no previous file | corelib/src/math.dart » ('j') | tests/co19/co19-runtime.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698