{ "cells": [ { "cell_type": "markdown", "metadata": { "nbsphinx": "hidden" }, "source": [ "This notebook is part of the `nbsphinx` documentation: http://nbsphinx.readthedocs.io/." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Ignoring Errors on a Per-Cell Basis\n", "\n", "Instead of ignoring errors for all notebooks or for some selected notebooks (see [the previous notebook](allow-errors.ipynb)), you can be more fine-grained and just allow errors on certain code cells by tagging them with the `raises-exception` tag." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "'no problem'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following code cell has the `raises-exception` tag." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "raises-exception" ] }, "outputs": [], "source": [ "problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following code cell is executed even though the previous cell raised an exception." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "'no problem'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "