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

Unified Diff: lib/core/exceptions.dart

Issue 10909166: Rename NoSuchMethodException to NoSuchMethodError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: lib/core/exceptions.dart
diff --git a/lib/core/exceptions.dart b/lib/core/exceptions.dart
index 7fe5ee10728f28ef7f622048b4b86a593402e87e..b6ab8257be2227227af2c292209334c14c7cbc3d 100644
--- a/lib/core/exceptions.dart
+++ b/lib/core/exceptions.dart
@@ -33,52 +33,6 @@ class IllegalAccessException implements Exception {
}
-/**
- * Exception thrown because of non-existing receiver's method.
- */
-class NoSuchMethodException implements Exception {
- const NoSuchMethodException(Object this._receiver,
- String this._functionName,
- List this._arguments,
- [List existingArgumentNames = null])
- : this._existingArgumentNames = existingArgumentNames;
-
- String toString() {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < _arguments.length; i++) {
- if (i > 0) {
- sb.add(", ");
- }
- sb.add(_arguments[i]);
- }
- if (_existingArgumentNames === null) {
- return "NoSuchMethodException : method not found: '$_functionName'\n"
- "Receiver: $_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 "NoSuchMethodException: incorrect number of arguments passed to "
- "method named '$_functionName'\nReceiver: $_receiver\n"
- "Tried calling: $_functionName($actualParameters)\n"
- "Found: $_functionName($formalParameters)";
- }
- }
-
- final Object _receiver;
- final String _functionName;
- final List _arguments;
- final List _existingArgumentNames;
-}
-
-
class ClosureArgumentMismatchException implements Exception {
const ClosureArgumentMismatchException();
String toString() => "Closure argument mismatch";

Powered by Google App Engine
This is Rietveld 408576698