You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems due to a specific interaction between pcall (used for try/catch) and coroutines (used for async), exclusive to Lua 5.1. Move information can be found here: http://lua-users.org/wiki/PcallAndCoroutines
I'm not entirely sure how to fix this yet, possibly we could decide to translate try/catch to a coroutine-safe implementation of pcall, as done here: https://github.com/keplerproject/coxpcall This would incur some performance penalty, but I doubt it is a big problem, the number of try/catch statements will probably be limited.
I considered the fact we could only do this special case if we are in an async function, but that seems impractical since the problem would also occur when using try/catch in a synchronous function that is called in an async function.
tsconfig:
Result:
Expected:
But then is working:
Result:
Result:
Expected:
But without .then, .catch working:
Result:
Result:
Expected:
The text was updated successfully, but these errors were encountered: