| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 : this._existingArgumentNames = existingArgumentNames; | 87 : this._existingArgumentNames = existingArgumentNames; |
| 88 | 88 |
| 89 String toString() { | 89 String toString() { |
| 90 StringBuffer sb = new StringBuffer(); | 90 StringBuffer sb = new StringBuffer(); |
| 91 for (int i = 0; i < _arguments.length; i++) { | 91 for (int i = 0; i < _arguments.length; i++) { |
| 92 if (i > 0) { | 92 if (i > 0) { |
| 93 sb.add(", "); | 93 sb.add(", "); |
| 94 } | 94 } |
| 95 sb.add(safeToString(_arguments[i])); | 95 sb.add(safeToString(_arguments[i])); |
| 96 } | 96 } |
| 97 if (_existingArgumentNames === null) { | 97 if (_existingArgumentNames == null) { |
| 98 return "NoSuchMethodError : method not found: '$_functionName'\n" | 98 return "NoSuchMethodError : method not found: '$_functionName'\n" |
| 99 "Receiver: ${safeToString(_receiver)}\n" | 99 "Receiver: ${safeToString(_receiver)}\n" |
| 100 "Arguments: [$sb]"; | 100 "Arguments: [$sb]"; |
| 101 } else { | 101 } else { |
| 102 String actualParameters = sb.toString(); | 102 String actualParameters = sb.toString(); |
| 103 sb = new StringBuffer(); | 103 sb = new StringBuffer(); |
| 104 for (int i = 0; i < _existingArgumentNames.length; i++) { | 104 for (int i = 0; i < _existingArgumentNames.length; i++) { |
| 105 if (i > 0) { | 105 if (i > 0) { |
| 106 sb.add(", "); | 106 sb.add(", "); |
| 107 } | 107 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 class OutOfMemoryError implements Error { | 140 class OutOfMemoryError implements Error { |
| 141 const OutOfMemoryError(); | 141 const OutOfMemoryError(); |
| 142 String toString() => "Out of Memory"; | 142 String toString() => "Out of Memory"; |
| 143 } | 143 } |
| 144 | 144 |
| 145 class StackOverflowError implements Error { | 145 class StackOverflowError implements Error { |
| 146 const StackOverflowError(); | 146 const StackOverflowError(); |
| 147 String toString() => "Stack Overflow"; | 147 String toString() => "Stack Overflow"; |
| 148 } | 148 } |
| OLD | NEW |