| 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 /** | 9 /** | 
| 10  * Error thrown by the runtime system when an assert statement fails. | 10  * Error thrown by the runtime system when an assert statement fails. | 
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 147       _namedArguments.forEach((String key, var value) { | 147       _namedArguments.forEach((String key, var value) { | 
| 148         if (i > 0) { | 148         if (i > 0) { | 
| 149           sb.add(", "); | 149           sb.add(", "); | 
| 150         } | 150         } | 
| 151         sb.add(key); | 151         sb.add(key); | 
| 152         sb.add(": "); | 152         sb.add(": "); | 
| 153         sb.add(safeToString(value)); | 153         sb.add(safeToString(value)); | 
| 154         i++; | 154         i++; | 
| 155       }); | 155       }); | 
| 156     } | 156     } | 
| 157     if (_existingArgumentNames === null) { | 157     if (_existingArgumentNames == null) { | 
| 158       return "NoSuchMethodError : method not found: '$_memberName'\n" | 158       return "NoSuchMethodError : method not found: '$_memberName'\n" | 
| 159           "Receiver: ${safeToString(_receiver)}\n" | 159           "Receiver: ${safeToString(_receiver)}\n" | 
| 160           "Arguments: [$sb]"; | 160           "Arguments: [$sb]"; | 
| 161     } else { | 161     } else { | 
| 162       String actualParameters = sb.toString(); | 162       String actualParameters = sb.toString(); | 
| 163       sb = new StringBuffer(); | 163       sb = new StringBuffer(); | 
| 164       for (int i = 0; i < _existingArgumentNames.length; i++) { | 164       for (int i = 0; i < _existingArgumentNames.length; i++) { | 
| 165         if (i > 0) { | 165         if (i > 0) { | 
| 166           sb.add(", "); | 166           sb.add(", "); | 
| 167         } | 167         } | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 219  * If a class is not intending to implement the feature, it should throw | 219  * If a class is not intending to implement the feature, it should throw | 
| 220  * an [UnsupportedError] instead. This error is only intended for | 220  * an [UnsupportedError] instead. This error is only intended for | 
| 221  * use during development. | 221  * use during development. | 
| 222  * | 222  * | 
| 223  * This class temporarily implements [Exception] for backwards compatibility. | 223  * This class temporarily implements [Exception] for backwards compatibility. | 
| 224  * The constructor is temporarily const to support [NotImplementedException]. | 224  * The constructor is temporarily const to support [NotImplementedException]. | 
| 225  */ | 225  */ | 
| 226 class UnimplementedError implements UnsupportedError, NotImplementedException { | 226 class UnimplementedError implements UnsupportedError, NotImplementedException { | 
| 227   final String message; | 227   final String message; | 
| 228   const UnimplementedError([String this.message]); | 228   const UnimplementedError([String this.message]); | 
| 229   String toString() => (this.message !== null | 229   String toString() => (this.message != null | 
| 230                         ? "UnimplementedError: $message" | 230                         ? "UnimplementedError: $message" | 
| 231                         : "UnimplementedError"); | 231                         : "UnimplementedError"); | 
| 232 } | 232 } | 
| 233 | 233 | 
| 234 | 234 | 
| 235 /** Temporary class added for backwards compatibility. Will be removed. */ | 235 /** Temporary class added for backwards compatibility. Will be removed. */ | 
| 236 interface NotImplementedException extends Exception default UnimplementedError { | 236 interface NotImplementedException extends Exception default UnimplementedError { | 
| 237   const NotImplementedException([String message]); | 237   const NotImplementedException([String message]); | 
| 238 } | 238 } | 
| 239 | 239 | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 253 | 253 | 
| 254 class OutOfMemoryError implements Error { | 254 class OutOfMemoryError implements Error { | 
| 255   const OutOfMemoryError(); | 255   const OutOfMemoryError(); | 
| 256   String toString() => "Out of Memory"; | 256   String toString() => "Out of Memory"; | 
| 257 } | 257 } | 
| 258 | 258 | 
| 259 class StackOverflowError implements Error { | 259 class StackOverflowError implements Error { | 
| 260   const StackOverflowError(); | 260   const StackOverflowError(); | 
| 261   String toString() => "Stack Overflow"; | 261   String toString() => "Stack Overflow"; | 
| 262 } | 262 } | 
| OLD | NEW | 
|---|