Skip to content

Errors that code can throw

Rich Chiodo edited this page Jul 28, 2022 · 9 revisions

The table below lists all of the specific errors we throw in the Juptyer extension's code, what causes each error, and how each error is handled.

Error Location What causes the error Category How is it handled
InteractiveCellResultError Kernel gets an error when executing a cell 📓 Bubbles up inside the InteractiveWindow or CodeWatcher in order to indicate which cell had an error. Basically lets an error come out to the correct cell in the InteractiveWindow because the last cell isn't the one that caused the error (if multiple are queued)
JupyterDebuggerNotInstalledError Thrown when we can't load debugpy into the interactive window's kernel. 📓 Shown to the user in a cell's output that they tried to debug
KernelInterruptTimeoutError Thrown when a kernel interrupt takes longer than 60 seconds. Can be caused by the kernel doing something uninterruptable 🎲 Interrupt just turns into a restart. User isn't shown anything AFAICT. Seems like a bug, but there are two timeouts in play. The second one ends up creating the true timeout situation
SessionDisposedError General error when a the session is disposed and then used. ℹ️ Generally this is a bug in our code as this error is unexpected. User should see a notification but may sometimes only show up in the trace output. Has been caused in the past by referencing session objects after a kernel restart.

Categories for errors

  • 📓 Shows error in cell - Error shows up in the notebook or interactive window cell that was run to generate the error or the last cell executed.
  • ❗ Shows modal dialog - Error HAS to be handled by the user to continue. This is stuff that we can't continue from
  • ℹ️ Shows notification - Error might be important, but it's not blocking anything\
  • 🎲 Error is captured - Error is captured by the code and not shown to the user. It's used for control flow.
Clone this wiki locally