webassembly/proxy_c: Reject promises with a PythonError instance.

The `reason` in a rejected promise should be an instance of `Error`.  That
leads to better error messages on the JavaScript side.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-05-06 12:26:20 +10:00
parent 9681a66c6b
commit 9da63a343e
3 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
PythonError NameError
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'fail' isn't defined