Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More verbose exceptions in callables #63

Open
qwenger opened this issue Oct 22, 2021 · 0 comments · May be fixed by #79
Open

More verbose exceptions in callables #63

qwenger opened this issue Oct 22, 2021 · 0 comments · May be fixed by #79
Assignees

Comments

@qwenger
Copy link
Collaborator

qwenger commented Oct 22, 2021

When an exception happens in a Python callable added via (Context|Function).add_callable, the error message is not specific, which makes it hard to debug.

Of course, one could wrap each callable in a try/except block, but that's tedious.

I understand that the error cannot really be raised directly to Python, as it has to go through the JS machinery, thereby losing most of the exception stack. But maybe one could at least write the traceback to stderr, eg. using PyErr_WriteUnraisable?

This seems to be the way adopted by CFFI in absence of a specific handler.

qwenger added a commit to qwenger/quickjs that referenced this issue Apr 8, 2022
…ns into custom InternalPythonError object extending InternalError.
@qwenger qwenger self-assigned this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant