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

Unified Diff: lib/uri/encode_decode.dart

Issue 10989013: Change IllegalArgumentException to ArgumentError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated co19 test expectations. Created 8 years, 3 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: lib/uri/encode_decode.dart
diff --git a/lib/uri/encode_decode.dart b/lib/uri/encode_decode.dart
index 511bce05dfdb8bf5a56df64fc72fc640e6b399b7..6338518a4a5a290b2dbfe959912ccbbeb07ffbc4 100644
--- a/lib/uri/encode_decode.dart
+++ b/lib/uri/encode_decode.dart
@@ -90,7 +90,7 @@ String _uriEncode(String canonical, String text) {
// convert the pair to a U+10000 codepoint
ch = 0x10000 + ((ch-0xD800) << 10) + (nextCh - 0xDC00);
} else {
- throw new IllegalArgumentException('Malformed URI');
+ throw new ArgumentError('Malformed URI');
}
}
for (int codepoint in codepointsToUtf8([ch])) {
@@ -132,7 +132,7 @@ String _uriDecode(String text) {
codepoints.clear();
while (ch == '%') {
if (++i > text.length - 2) {
- throw new IllegalArgumentException('Truncated URI');
+ throw new ArgumentError('Truncated URI');
}
codepoints.add(_hexCharPairToByte(text, i));
i += 2;

Powered by Google App Engine
This is Rietveld 408576698