archives

« Bugzilla Issues Index

#1259 — state of generator after error thrown


Hi,

I realize the generator language hasn't landed yet in the spec, but if we take this as a reference:

http://wiki.ecmascript.org/doku.php?id=harmony:generators

I think perhaps the interaction between exceptions and generator state is not quite clear.

Specifically: if a generator throws an uncaught exception, what is its state?

If a generator throws a StopIteration explicitly, what is its state?

As it is, harmony:generators suggests that the generator would be left in the "executing" state in both cases. This is OK but it might merit a clarification.


this is now convered by the actual spec. language. See section 25.3.3