This page was generated from doc/allow-errors-per-cell.ipynb. Interactive online version: Binder badge.

Ignoring Errors on a Per-Cell Basis

Instead of ignoring errors for all notebooks or for some selected notebooks (see the previous notebook), you can be more fine-grained and just allow errors on certain code cells by tagging them with the raises-exception tag.

'no problem'
'no problem'

The following code cell has the raises-exception tag.

NameError                                 Traceback (most recent call last)
<ipython-input-1-526ab3a89ffc> in <module>
----> 1 problem

NameError: name 'problem' is not defined

The following code cell is executed even though the previous cell raised an exception.

'no problem'


The behavior of the raises-exception tag doesn’t match its name. While it does allow exceptions, it does not check if an exception is actually raised!

This will hopefully be fixed at some point, see