Closed qwenger closed 2 years ago
Simple attempt for #63 . PyErr_WriteUnraisable seems to fit the bill quite well with minimal work.
PyErr_WriteUnraisable
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>)
Closing in favor of #67.
Simple attempt for #63 .
PyErr_WriteUnraisable
seems to fit the bill quite well with minimal work.Test: