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

Unified Diff: lib/coreimpl/queue.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/coreimpl/hash_map_set.dart ('k') | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/coreimpl/queue.dart
diff --git a/lib/coreimpl/queue.dart b/lib/coreimpl/queue.dart
index 84c4efd33cc29cd1230a6f46a08bfd7ec375eb61..5fe00b30a9cb540c1c2adff944169bbb3e061bde 100644
--- a/lib/coreimpl/queue.dart
+++ b/lib/coreimpl/queue.dart
@@ -74,7 +74,7 @@ class _DoubleLinkedQueueEntrySentinel<E> extends DoubleLinkedQueueEntry<E> {
}
E remove() {
- throw const EmptyQueueException();
+ throw new StateError("Empty queue");
}
DoubleLinkedQueueEntry<E> _asNonSentinelEntry() {
@@ -87,7 +87,7 @@ class _DoubleLinkedQueueEntrySentinel<E> extends DoubleLinkedQueueEntry<E> {
}
E get element {
- throw const EmptyQueueException();
+ throw new StateError("Empty queue");
}
}
@@ -255,7 +255,7 @@ class _DoubleLinkedQueueIterator<E> implements Iterator<E> {
E next() {
if (!hasNext) {
- throw const NoMoreElementsException();
+ throw new StateError("No more elements");
}
_currentEntry = _currentEntry._next;
return _currentEntry.element;
« no previous file with comments | « lib/coreimpl/hash_map_set.dart ('k') | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698