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

Unified Diff: sdk/lib/core/errors.dart

Issue 12297010: - Split the implementation of NoSuchMethodError in preparation for (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 | « sdk/lib/_internal/compiler/implementation/lib/core_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/errors.dart
===================================================================
--- sdk/lib/core/errors.dart (revision 18612)
+++ sdk/lib/core/errors.dart (working copy)
@@ -151,49 +151,7 @@
[List existingArgumentNames = null])
: this._existingArgumentNames = existingArgumentNames;
- String toString() {
- StringBuffer sb = new StringBuffer();
- int i = 0;
- if (_arguments != null) {
- for (; i < _arguments.length; i++) {
- if (i > 0) {
- sb.add(", ");
- }
- sb.add(Error.safeToString(_arguments[i]));
- }
- }
- if (_namedArguments != null) {
- _namedArguments.forEach((String key, var value) {
- if (i > 0) {
- sb.add(", ");
- }
- sb.add(key);
- sb.add(": ");
- sb.add(Error.safeToString(value));
- i++;
- });
- }
- if (_existingArgumentNames == null) {
- return "NoSuchMethodError : method not found: '$_memberName'\n"
- "Receiver: ${Error.safeToString(_receiver)}\n"
- "Arguments: [$sb]";
- } else {
- String actualParameters = sb.toString();
- sb = new StringBuffer();
- for (int i = 0; i < _existingArgumentNames.length; i++) {
- if (i > 0) {
- sb.add(", ");
- }
- sb.add(_existingArgumentNames[i]);
- }
- String formalParameters = sb.toString();
- return "NoSuchMethodError: incorrect number of arguments passed to "
- "method named '$_memberName'\n"
- "Receiver: ${Error.safeToString(_receiver)}\n"
- "Tried calling: $_memberName($actualParameters)\n"
- "Found: $_memberName($formalParameters)";
- }
- }
+ external String toString();
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/core_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698