commit | 389116d8abcc96db3cfe2f3cc25789c089fe12d6 | [log] [tgz] |
---|---|---|
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | Thu May 09 11:13:45 2019 -0300 |
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | Thu May 09 11:13:45 2019 -0300 |
tree | f3d07b50c17f28ba09cf547d5a67519ffe3271a4 | |
parent | 01bded3d8cd88a2d7f472b45f706565f1a9ef3b1 [diff] |
Coroutines do not unwind the stack in case of errors Back to how it was, a coroutine does not unwind its stack in case of errors (and therefore do not close its to-be-closed variables). This allows the stack to be examined after the error. The program can use 'coroutine.kill' to close the variables. The function created by 'coroutine.wrap', however, closes the coroutine's variables in case of errors, as it is impossible to examine the stack any way.