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

Unified Diff: corelib/src/exceptions.dart

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | corelib/src/math.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/exceptions.dart
diff --git a/corelib/src/exceptions.dart b/corelib/src/exceptions.dart
index 60a29af25ff4843207633245660d4e16c4ceedcd..2c72deea8e42a098010da46227bea17c09b0ad8f 100644
--- a/corelib/src/exceptions.dart
+++ b/corelib/src/exceptions.dart
@@ -110,10 +110,22 @@ class StackOverflowException implements Exception {
}
-class BadNumberFormatException implements Exception {
- const BadNumberFormatException(String this._s);
- String toString() => "BadNumberFormatException: '$_s'";
- final String _s;
+/**
+ * Exception thrown when a string or some other data does not have an expected
+ * format and cannot be parsed or processed.
+ */
+class FormatException implements Exception {
+ /**
+ * A message describing the format error.
+ */
+ final String message;
+
+ /**
+ * Creates a new FormatException with an optional error [message].
+ */
+ const FormatException([this.message = ""]);
+
+ String toString() => "FormatException: $message";
}
« no previous file with comments | « no previous file | corelib/src/math.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698