ipython / ipykernel

IPython Kernel for Jupyter
https://ipykernel.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
654 stars 369 forks source link

errors not reported in new async code #1279

Open minrk opened 1 month ago

minrk commented 1 month ago

If errors are raised in the new async code, as I'm seeing in trying to update IPython Parallel to the new async APIs, there is often no indication of a problem, messages just don't get handled.

We need to be careful to catch and log all errors in ipykernel code, because the default excepthook sends them to the captured stderr stream, which won't be seen in the kernel logs. That means everything we launch with e.g. start_soon etc. must be hooked up to a generic try/except to catch and log all unhandled exceptions instead of letting them raise.