| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class Error { | 5 class Error { |
| 6 const Error(); | 6 const Error(); |
| 7 } | 7 } |
| 8 | 8 |
| 9 class AssertionError implements Error { | 9 class AssertionError implements Error { |
| 10 } | 10 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 : this._existingArgumentNames = existingArgumentNames; | 81 : this._existingArgumentNames = existingArgumentNames; |
| 82 | 82 |
| 83 String toString() { | 83 String toString() { |
| 84 StringBuffer sb = new StringBuffer(); | 84 StringBuffer sb = new StringBuffer(); |
| 85 for (int i = 0; i < _arguments.length; i++) { | 85 for (int i = 0; i < _arguments.length; i++) { |
| 86 if (i > 0) { | 86 if (i > 0) { |
| 87 sb.add(", "); | 87 sb.add(", "); |
| 88 } | 88 } |
| 89 sb.add(safeToString(_arguments[i])); | 89 sb.add(safeToString(_arguments[i])); |
| 90 } | 90 } |
| 91 if (_existingArgumentNames === null) { | 91 if (_existingArgumentNames == null) { |
| 92 return "NoSuchMethodError : method not found: '$_functionName'\n" | 92 return "NoSuchMethodError : method not found: '$_functionName'\n" |
| 93 "Receiver: ${safeToString(_receiver)}\n" | 93 "Receiver: ${safeToString(_receiver)}\n" |
| 94 "Arguments: [$sb]"; | 94 "Arguments: [$sb]"; |
| 95 } else { | 95 } else { |
| 96 String actualParameters = sb.toString(); | 96 String actualParameters = sb.toString(); |
| 97 sb = new StringBuffer(); | 97 sb = new StringBuffer(); |
| 98 for (int i = 0; i < _existingArgumentNames.length; i++) { | 98 for (int i = 0; i < _existingArgumentNames.length; i++) { |
| 99 if (i > 0) { | 99 if (i > 0) { |
| 100 sb.add(", "); | 100 sb.add(", "); |
| 101 } | 101 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 128 } | 128 } |
| 129 | 129 |
| 130 external static String _objectToString(Object object); | 130 external static String _objectToString(Object object); |
| 131 } | 131 } |
| 132 | 132 |
| 133 | 133 |
| 134 class OutOfMemoryError implements Exception { | 134 class OutOfMemoryError implements Exception { |
| 135 const OutOfMemoryError(); | 135 const OutOfMemoryError(); |
| 136 String toString() => "Out of Memory"; | 136 String toString() => "Out of Memory"; |
| 137 } | 137 } |
| OLD | NEW |