MatAtBread / fast-async

605 stars 21 forks source link

try/finally not working? #43

Closed djMax closed 6 years ago

djMax commented 6 years ago

I don't have detailed repro steps yet, but this seems to confuse fast-async:

try {
  // some stuff
  try {
    // some more stuff
  } finally {
    // cleanup stuff
  }
  // super important stuff
} catch (error) {
  // whatever
}

Basically, after "cleanup stuff" is run, it just falls off into the ether somewhere. "super important stuff" is never run.

matAtWork commented 6 years ago

If you can provide an example, I'll take a look - through http://nodent.mailed.me.uk/ is good. There are a few test cases in the nodent repo to catch just this kind of thing, but it's possible there's an edge case I haven't covered. The tests are in https://github.com/MatAtBread/nodent/tree/master/tests/semantics - mainly the files with 'try' in the filename.

matAtWork commented 6 years ago

I'm going to close this as I don't have an example I can reproduce. Feel free to re-open if you can provide a basic test case