Index: lib/compiler/implementation/lib/coreimpl_patch.dart |
diff --git a/lib/compiler/implementation/lib/coreimpl_patch.dart b/lib/compiler/implementation/lib/coreimpl_patch.dart |
index 4388dee2b4d5c83d6a24613d5fa4b101957f29c3..24ee7af9151c4f243ec9f1794035f89a4804a5ea 100644 |
--- a/lib/compiler/implementation/lib/coreimpl_patch.dart |
+++ b/lib/compiler/implementation/lib/coreimpl_patch.dart |
@@ -11,7 +11,7 @@ patch class StringImplementation { |
patch static _fromCharCodes(List<int> charCodes) { |
checkNull(charCodes); |
if (!isJsArray(charCodes)) { |
- if (charCodes is !List) throw new IllegalArgumentException(charCodes); |
+ if (charCodes is !List) throw new ArgumentError(charCodes); |
charCodes = new List.from(charCodes); |
} |
return Primitives.stringFromCharCodes(charCodes); |
@@ -20,7 +20,7 @@ patch class StringImplementation { |
patch String join(List<String> strings, String separator) { |
checkNull(strings); |
checkNull(separator); |
- if (separator is !String) throw new IllegalArgumentException(separator); |
+ if (separator is !String) throw new ArgumentError(separator); |
return stringJoinUnchecked(_toJsStringArray(strings), separator); |
} |
@@ -37,14 +37,14 @@ patch class StringImplementation { |
for (int i = 0; i < length; i++) { |
final string = strings[i]; |
checkNull(string); |
- if (string is !String) throw new IllegalArgumentException(string); |
+ if (string is !String) throw new ArgumentError(string); |
} |
} else { |
array = new List(length); |
for (int i = 0; i < length; i++) { |
final string = strings[i]; |
checkNull(string); |
- if (string is !String) throw new IllegalArgumentException(string); |
+ if (string is !String) throw new ArgumentError(string); |
array[i] = string; |
} |
} |