Index: utils/pub/version.dart |
diff --git a/utils/pub/version.dart b/utils/pub/version.dart |
index 4a37062e618201a4a24a4bbd05a36c9bcc19c8b0..33a8c05c628c4c1bafb8cd308f2b36402ccebf33 100644 |
--- a/utils/pub/version.dart |
+++ b/utils/pub/version.dart |
@@ -69,7 +69,7 @@ class Version implements Comparable, Hashable, VersionConstraint { |
String build = match[8]; |
return new Version(major, minor, patch, preRelease, build); |
- } catch (FormatException ex) { |
+ } on FormatException catch (ex) { |
throw new FormatException('Could not parse "$text".'); |
} |
} |
@@ -183,7 +183,7 @@ class Version implements Comparable, Hashable, VersionConstraint { |
return text.split('.').map((part) { |
try { |
return parseInt(part); |
- } catch (FormatException ex) { |
+ } on FormatException catch (ex) { |
// Not a number. |
return part; |
} |