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

Unified Diff: runtime/lib/string.cc

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.cc
diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc
index d48018a30cf52468a221a6831fcc2d34999be7c3..41c3181ba654441feb3e7255655ebd422b1195fd 100644
--- a/runtime/lib/string.cc
+++ b/runtime/lib/string.cc
@@ -27,12 +27,12 @@ DEFINE_NATIVE_ENTRY(StringBase_createFromCodePoints, 1) {
if (!index_object.IsSmi()) {
GrowableArray<const Object*> args;
args.Add(&index_object);
- Exceptions::ThrowByType(Exceptions::kIllegalArgument, args);
+ Exceptions::ThrowByType(Exceptions::kArgument, args);
}
intptr_t value = Smi::Cast(index_object).Value();
if (value < 0) {
GrowableArray<const Object*> args;
- Exceptions::ThrowByType(Exceptions::kIllegalArgument, args);
+ Exceptions::ThrowByType(Exceptions::kArgument, args);
} else if (value > 0xFFFF) {
is_one_byte_string = false;
is_two_byte_string = false;
@@ -151,7 +151,7 @@ DEFINE_NATIVE_ENTRY(Strings_concatAll, 1) {
if (!elem.IsString()) {
GrowableArray<const Object*> args;
args.Add(&elem);
- Exceptions::ThrowByType(Exceptions::kIllegalArgument, args);
+ Exceptions::ThrowByType(Exceptions::kArgument, args);
}
}
return String::ConcatAll(strings);

Powered by Google App Engine
This is Rietveld 408576698