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

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

Issue 11269045: Convert NoMoreElementsException and EmptyQueueException to StateError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/core/errors.dart ('k') | lib/core/iterator.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 // Exceptions are thrown either by the VM or from Dart code. 5 // Exceptions are thrown either by the VM or from Dart code.
6 6
7 /** 7 /**
8 * Interface implemented by all core library exceptions. 8 * Interface implemented by all core library exceptions.
9 * Defaults to an implementation that only carries a simple message. 9 * Defaults to an implementation that only carries a simple message.
10 */ 10 */
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 } 67 }
68 68
69 String get exceptionName => "NullPointerException"; 69 String get exceptionName => "NullPointerException";
70 70
71 final String functionName; 71 final String functionName;
72 final List arguments; 72 final List arguments;
73 } 73 }
74 74
75 75
76 class NoMoreElementsException implements Exception {
77 const NoMoreElementsException();
78 String toString() => "NoMoreElementsException";
79 }
80
81
82 class EmptyQueueException implements Exception {
83 const EmptyQueueException();
84 String toString() => "EmptyQueueException";
85 }
86
87
88 class NotImplementedException implements Exception { 76 class NotImplementedException implements Exception {
89 const NotImplementedException([String message]) : this._message = message; 77 const NotImplementedException([String message]) : this._message = message;
90 String toString() => (this._message !== null 78 String toString() => (this._message !== null
91 ? "NotImplementedException: $_message" 79 ? "NotImplementedException: $_message"
92 : "NotImplementedException"); 80 : "NotImplementedException");
93 final String _message; 81 final String _message;
94 } 82 }
95 83
96 84
97 class IllegalJSRegExpException implements Exception { 85 class IllegalJSRegExpException implements Exception {
(...skipping 10 matching lines...) Expand all
108 } 96 }
109 97
110 /** 98 /**
111 * Exception thrown when a runtime error occurs. 99 * Exception thrown when a runtime error occurs.
112 */ 100 */
113 class RuntimeError implements Exception { 101 class RuntimeError implements Exception {
114 final message; 102 final message;
115 RuntimeError(this.message); 103 RuntimeError(this.message);
116 String toString() => "RuntimeError: $message"; 104 String toString() => "RuntimeError: $message";
117 } 105 }
OLDNEW
« no previous file with comments | « lib/core/errors.dart ('k') | lib/core/iterator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698