Skip to content

Conversation

@qwenger
Copy link
Collaborator

@qwenger qwenger commented Oct 22, 2021

Simple attempt for #63 . PyErr_WriteUnraisable seems to fit the bill quite well with minimal work.

Test:

>>> import quickjs
>>> def test():
...     1/0
... 
>>> ctx = quickjs.Context()
>>> ctx.add_callable("test", test)
>>> ctx.eval("test()")
Exception ignored in: <function test at 0x7efe29521940>
Traceback (most recent call last):
  File "<stdin>", line 2, in test
ZeroDivisionError: division by zero
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_quickjs.JSException: InternalError: Python call failed.
    at test (native)
    at <eval> (<input>)

@qwenger
Copy link
Collaborator Author

qwenger commented Oct 27, 2021

Closing in favor of #67.

@qwenger qwenger closed this Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant