This notebook is part of the nbsphinx documentation: http://nbsphinx.readthedocs.io/.

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.


In [ ]:
'no problem'

The following code cell has the raises-exception tag.


In [ ]:
problem

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


In [ ]:
'no problem'
Note 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 https://github.com/jupyter/nbconvert/issues/730.