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

Unified Diff: runtime/lib/errors_patch.dart

Issue 13982018: - Print "top-level" instead of "class '::'" in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors_patch.dart
===================================================================
--- runtime/lib/errors_patch.dart (revision 21949)
+++ runtime/lib/errors_patch.dart (working copy)
@@ -125,10 +125,14 @@
}
var args_mismatch = _existingArgumentNames != null;
StringBuffer msg_buf = new StringBuffer(_developerMessage(args_mismatch));
+ String receiver_str = Error.safeToString(_receiver);
+ if ("Type: class '::'" == receiver_str) {
+ receiver_str = "top-level";
+ }
if (!args_mismatch) {
msg_buf.write(
"NoSuchMethodError : method not found: '$_memberName'\n"
- "Receiver: ${Error.safeToString(_receiver)}\n"
+ "Receiver: $receiver_str\n"
"Arguments: [$actual_buf]");
} else {
String actualParameters = actual_buf.toString();
@@ -143,7 +147,7 @@
msg_buf.write(
"NoSuchMethodError: incorrect number of arguments passed to "
"method named '$_memberName'\n"
- "Receiver: ${Error.safeToString(_receiver)}\n"
+ "Receiver: $receiver_str\n"
"Tried calling: $_memberName($actualParameters)\n"
"Found: $_memberName($formalParameters)");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698