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

Side by Side Diff: lib/core/errors.dart

Issue 11013010: Throw AbstractClassInstantiationError on abstract class instantiation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed passing tests from status file. Fixed order of class elements. Reverted source code formatt… Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 final String _className;
51 const AbstractClassInstantiationError(String this._className);
52 String toString() => "Cannot instantiate abstract class: '$_className'";
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
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 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698