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

Unified Diff: pkg/fixnum/lib/src/int32.dart

Issue 34223002: Throw FormatException when Int32/Int64.parseRadix() encounters bad digit (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Formatting fix Created 7 years, 2 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 | pkg/fixnum/lib/src/int64.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fixnum/lib/src/int32.dart
diff --git a/pkg/fixnum/lib/src/int32.dart b/pkg/fixnum/lib/src/int32.dart
index c013f916085adae32fbb6d6f0a0ba50f615e36fd..d7000401d855008432763a2ec0d8e71c1580e9ab 100644
--- a/pkg/fixnum/lib/src/int32.dart
+++ b/pkg/fixnum/lib/src/int32.dart
@@ -71,7 +71,7 @@ class Int32 implements IntX {
int c = s.codeUnitAt(i);
int digit = _decodeDigit(c);
if (digit < 0 || digit >= radix) {
- throw new Exception("Non-radix code unit: $c");
+ throw new FormatException("Non-radix code unit: $c");
}
x = (x * radix) + digit;
}
« no previous file with comments | « no previous file | pkg/fixnum/lib/src/int64.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698