Chromium Code Reviews| 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 28 matching lines...) Expand all Loading... | |
| 39 */ | 39 */ |
| 40 class IllegalArgumentException extends ArgumentError { | 40 class IllegalArgumentException extends ArgumentError { |
| 41 const IllegalArgumentException([argument = ""]) : super(argument); | 41 const IllegalArgumentException([argument = ""]) : super(argument); |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 class FallThroughError implements Error { | 45 class FallThroughError implements Error { |
| 46 const FallThroughError(); | 46 const FallThroughError(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 class AbstractClassInstantiationError { | 49 class AbstractClassInstantiationError implements Error { |
| 50 String toString() => "Cannot instantiate abstract class: '$_className'"; | |
| 51 const AbstractClassInstantiationError(String this._className); | |
| 52 final String _className; | |
|
ahe
2012/10/11 18:27:07
Please use this order of members:
fields
construc
aam-me
2012/10/12 01:14:06
Done.
| |
| 50 } | 53 } |
| 51 | 54 |
| 52 /** | 55 /** |
| 53 * Error thrown by the default implementation of [:noSuchMethod:] on [Object]. | 56 * Error thrown by the default implementation of [:noSuchMethod:] on [Object]. |
| 54 */ | 57 */ |
| 55 class NoSuchMethodError implements Error { | 58 class NoSuchMethodError implements Error { |
| 56 final Object _receiver; | 59 final Object _receiver; |
| 57 final String _functionName; | 60 final String _functionName; |
| 58 final List _arguments; | 61 final List _arguments; |
| 59 final List _existingArgumentNames; | 62 final List _existingArgumentNames; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 .replaceAll('\n', '${backslash}n') | 122 .replaceAll('\n', '${backslash}n') |
| 120 .replaceAll('\r', '${backslash}r') | 123 .replaceAll('\r', '${backslash}r') |
| 121 .replaceAll('"', '$backslash"'); | 124 .replaceAll('"', '$backslash"'); |
| 122 return '"$escaped"'; | 125 return '"$escaped"'; |
| 123 } | 126 } |
| 124 return _objectToString(object); | 127 return _objectToString(object); |
| 125 } | 128 } |
| 126 | 129 |
| 127 external static String _objectToString(Object object); | 130 external static String _objectToString(Object object); |
| 128 } | 131 } |
| OLD | NEW |