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

Unified Diff: runtime/lib/string_base.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: runtime/lib/string_base.dart
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index aaa3f0b54d81edd0914ff1feb35c0300417b14cd..cdfeff445d6db84483c366ebb17e8541712d1496 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -194,10 +194,10 @@ class StringBase {
String replaceFirst(Pattern pattern, String replacement) {
if (pattern is! Pattern) {
- throw new IllegalArgumentException("${pattern} is not a Pattern");
+ throw new ArgumentError("${pattern} is not a Pattern");
}
if (replacement is! String) {
- throw new IllegalArgumentException("${replacement} is not a String");
+ throw new ArgumentError("${replacement} is not a String");
}
StringBuffer buffer = new StringBuffer();
int startIndex = 0;
@@ -212,10 +212,10 @@ class StringBase {
String replaceAll(Pattern pattern, String replacement) {
if (pattern is! Pattern) {
- throw new IllegalArgumentException("${pattern} is not a Pattern");
+ throw new ArgumentError("${pattern} is not a Pattern");
}
if (replacement is! String) {
- throw new IllegalArgumentException("${replacement} is not a String");
+ throw new ArgumentError("${replacement} is not a String");
}
StringBuffer buffer = new StringBuffer();
int startIndex = 0;

Powered by Google App Engine
This is Rietveld 408576698