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

Unified Diff: runtime/vm/exceptions.cc

Issue 12328019: - Improve the message for NoSuchMethodErrors that are (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « runtime/vm/debugger_api_impl_test.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 18846)
+++ runtime/vm/exceptions.cc (working copy)
@@ -424,6 +424,7 @@
RawObject* Exceptions::Create(ExceptionType type, const Array& arguments) {
Library& library = Library::Handle();
const String* class_name = NULL;
+ const String* constructor_name = &Symbols::Dot();
switch (type) {
case kNone:
UNREACHABLE();
@@ -439,6 +440,7 @@
case kNoSuchMethod:
library = Library::CoreLibrary();
class_name = &Symbols::NoSuchMethodError();
+ constructor_name = &String::Handle(Symbols::New("._withType"));
break;
case kFormat:
library = Library::CoreLibrary();
@@ -478,7 +480,10 @@
break;
}
- return DartLibraryCalls::ExceptionCreate(library, *class_name, arguments);
+ return DartLibraryCalls::ExceptionCreate(library,
+ *class_name,
+ *constructor_name,
+ arguments);
}
} // namespace dart
« no previous file with comments | « runtime/vm/debugger_api_impl_test.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698