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

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

Issue 17361004: Move FiftythreeBitOverflowError to VM-only patch file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding rationale to error test. Created 7 years, 6 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 | « runtime/vm/symbols.h ('k') | tests/standalone/53bit_overflow_test.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 part of dart.core; 5 part of dart.core;
6 6
7 class Error { 7 class Error {
8 const Error(); 8 const Error();
9 9
10 /** 10 /**
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const OutOfMemoryError(); 228 const OutOfMemoryError();
229 String toString() => "Out of Memory"; 229 String toString() => "Out of Memory";
230 } 230 }
231 231
232 232
233 class StackOverflowError implements Error { 233 class StackOverflowError implements Error {
234 const StackOverflowError(); 234 const StackOverflowError();
235 String toString() => "Stack Overflow"; 235 String toString() => "Stack Overflow";
236 } 236 }
237 237
238 class FiftyThreeBitOverflowError implements Error {
239 final Object value;
240
241 const FiftyThreeBitOverflowError(this.value);
242 String toString() => "53-bit Overflow: $value";
243 }
244
245 /** 238 /**
246 * Error thrown when a lazily initialized variable cannot be initialized. 239 * Error thrown when a lazily initialized variable cannot be initialized.
247 * 240 *
248 * A static/library variable with an initializer expression is initialized 241 * A static/library variable with an initializer expression is initialized
249 * the first time it is read. If evaluating the initializer expression causes 242 * the first time it is read. If evaluating the initializer expression causes
250 * another read of the variable, this error is thrown. 243 * another read of the variable, this error is thrown.
251 */ 244 */
252 class CyclicInitializationError implements Error { 245 class CyclicInitializationError implements Error {
253 final String variableName; 246 final String variableName;
254 const CyclicInitializationError([this.variableName]); 247 const CyclicInitializationError([this.variableName]);
255 String toString() => variableName == null 248 String toString() => variableName == null
256 ? "Reading static variable during its initialization" 249 ? "Reading static variable during its initialization"
257 : "Reading static variable '$variableName' during its initialization"; 250 : "Reading static variable '$variableName' during its initialization";
258 } 251 }
OLDNEW
« no previous file with comments | « runtime/vm/symbols.h ('k') | tests/standalone/53bit_overflow_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698