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

Unified Diff: corelib/src/exceptions.dart

Issue 9307074: If programmer mistakes the number of arguments, VM throws noSuchMethod. Extend reporting to repor... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 | runtime/lib/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/exceptions.dart
===================================================================
--- corelib/src/exceptions.dart (revision 3908)
+++ corelib/src/exceptions.dart (working copy)
@@ -37,7 +37,8 @@
class NoSuchMethodException implements Exception {
const NoSuchMethodException(Object this._receiver,
String this._functionName,
- List this._arguments);
+ List this._arguments,
+ [String this._extraMessage = ""]);
String toString() {
StringBuffer sb = new StringBuffer();
@@ -48,13 +49,15 @@
sb.add(_arguments[i]);
}
sb.add("]");
+ var x = _extraMessage;
return "NoSuchMethodException - receiver: '$_receiver' " +
- "function name: '$_functionName' arguments: [$sb]";
+ "function name: '$_functionName' arguments: [$sb]$x";
}
final Object _receiver;
final String _functionName;
final List _arguments;
+ final String _extraMessage;
}
« no previous file with comments | « no previous file | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698