Closed azam closed 8 months ago
QuickJS doesn't support top level await, so it generates an error for await (async() => 69)
.
This error isn't displayed because of some design choices we had to make in the library.
If you want to see what the specific error is that is raise you need to first retrieve it from the context.
If you use CatchResultExt::catch
you can retrieve the error from the context and you will see that QuickJS returns an error.
Got it. Thank you for the explanation!
For others that may encounter this, my error was: Exception generated by quickjs: 'await' is not defined
Hello, I arrived at this repository from LLRT!
In case you want to add support for top level await
, I wanted to say that I have made a patch that I submitted to the QuickJS mailing list about a year ago.
The patch was eventually added to txiki.js, and I’ve also just uploaded my original patch to sr.ht.
This code throws an Err with message "Exception generated by quickjs". Is this code wrong, or is there a limitation of some sort? Tested on
rquickjs = { version = "0.3.1", features = ["full-async"] }
withasync-std
andtokio