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

Unified Diff: lib/compiler/implementation/lib/js_helper.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
Index: lib/compiler/implementation/lib/js_helper.dart
diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
index e5476d45799af63c012c1651b46f318d88efaabe..1dfb8306bfccea66e4d468d1bb58d288f596c0ae 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -345,7 +345,7 @@ class ListIterator<T> implements Iterator<T> {
ListIterator(List<T> this.list) : i = 0;
bool get hasNext => i < JS('int', r'#.length', list);
T next() {
- if (!hasNext) throw new NoMoreElementsException();
+ if (!hasNext) throw new StateError("No more elements");
var value = JS('Object', r'#[#]', list, i);
i += 1;
return value;
« no previous file with comments | « lib/compiler/implementation/lib/coreimpl_patch.dart ('k') | lib/compiler/implementation/types/concrete_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698