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

print caught exceptions when (de)serializing #332

Merged
merged 5 commits into from
Jul 23, 2023

Conversation

glennmoy
Copy link
Contributor

The caught exception can useful for tracking down sources of bugs, as was the case for myself earlier today.

src/cpython/jlwrap.jl Outdated Show resolved Hide resolved
src/cpython/jlwrap.jl Outdated Show resolved Hide resolved
src/cpython/jlwrap.jl Outdated Show resolved Hide resolved
src/cpython/jlwrap.jl Outdated Show resolved Hide resolved
@cjdoris
Copy link
Collaborator

cjdoris commented Jul 4, 2023

I wonder if it's better to print a @debug log message instead.

Either way, please wrap this all in another try-catch block in case the sprint call fails for whatever reason. It's essential that this code doesn't throw.

@glennmoy
Copy link
Contributor Author

glennmoy commented Jul 5, 2023

I wonder if it's better to print a @debug log message instead.

Either way, please wrap this all in another try-catch block in case the sprint call fails for whatever reason. It's essential that this code doesn't throw.

sure - let me know if you think it's a good idea to print a second error message in the catch block... I figured it should say it tried to do display the original error without getting too self-referential.

@cjdoris cjdoris merged commit 7af2b30 into JuliaPy:main Jul 23, 2023
@cjdoris
Copy link
Collaborator

cjdoris commented Jul 23, 2023

Looks good, thanks!

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.

3 participants