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

Unified Diff: runtime/vm/exceptions.cc

Issue 1214723009: Make List constructor give better error messages for non-int arguments (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test to also pass on dart2js. Created 5 years, 5 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/vm/exceptions.cc
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index fa2e44179de9d83d7c11aceb4fa1899363a25afb..2ab0f4daf495f643a2b7a2bbbbbdda4d664c147d 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -598,6 +598,11 @@ RawObject* Exceptions::Create(ExceptionType type, const Array& arguments) {
library = Library::CoreLibrary();
class_name = &Symbols::ArgumentError();
break;
+ case kArgumentValue:
+ library = Library::CoreLibrary();
+ class_name = &Symbols::ArgumentError();
+ constructor_name = &Symbols::DotValue();
+ break;
case kNoSuchMethod:
library = Library::CoreLibrary();
class_name = &Symbols::NoSuchMethodError();

Powered by Google App Engine
This is Rietveld 408576698