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

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

Issue 10977078: Rename CastException to CastError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Now without the TODO. 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/lib/js_helper.dart ('k') | runtime/lib/error.dart » ('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 }
11 11
12 class TypeError implements AssertionError { 12 class TypeError implements AssertionError {
13 } 13 }
14 14
15 // TODO(lrn): Rename to CastError according to specification. 15 class CastError implements Error {
16 class CastException implements Error {
17 } 16 }
18 17
19 /** 18 /**
20 * Error thrown when a function is passed an unacceptable argument. 19 * Error thrown when a function is passed an unacceptable argument.
21 */ 20 */
22 class ArgumentError implements Error { 21 class ArgumentError implements Error {
23 final message; 22 final message;
24 23
25 /** The [message] describes the erroneous argument. */ 24 /** The [message] describes the erroneous argument. */
26 const ArgumentError([this.message = ""]); 25 const ArgumentError([this.message = ""]);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 .replaceAll('\n', '${backslash}n') 119 .replaceAll('\n', '${backslash}n')
121 .replaceAll('\r', '${backslash}r') 120 .replaceAll('\r', '${backslash}r')
122 .replaceAll('"', '$backslash"'); 121 .replaceAll('"', '$backslash"');
123 return '"$escaped"'; 122 return '"$escaped"';
124 } 123 }
125 return _objectToString(object); 124 return _objectToString(object);
126 } 125 }
127 126
128 external static _objectToString(Object object); 127 external static _objectToString(Object object);
129 } 128 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/lib/js_helper.dart ('k') | runtime/lib/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698