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

Unified Diff: utils/pub/version.dart

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Re-word comment as TODO. 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
Index: utils/pub/version.dart
diff --git a/utils/pub/version.dart b/utils/pub/version.dart
index bf638bc5e464f6cf47594e45d83f6eb9b7def32f..9fe2bd00df601b945f1cc3edd82be01a5729bfe2 100644
--- a/utils/pub/version.dart
+++ b/utils/pub/version.dart
@@ -67,7 +67,7 @@ class Version implements Comparable, Hashable, VersionConstraint {
String build = match[8];
return new Version(major, minor, patch, preRelease, build);
- } catch (BadNumberFormatException ex) {
+ } catch (FormatException ex) {
throw new FormatException('Could not parse "$text".');
}
}
@@ -181,7 +181,7 @@ class Version implements Comparable, Hashable, VersionConstraint {
return text.split('.').map((part) {
try {
return Math.parseInt(part);
- } catch (BadNumberFormatException ex) {
+ } catch (FormatException ex) {
// Not a number.
return part;
}

Powered by Google App Engine
This is Rietveld 408576698