From 81be6c575a869a66e7bb532fa208d16f880890d0 Mon Sep 17 00:00:00 2001 From: Michael Scott Cuthbert Date: Mon, 5 Jun 2017 19:30:48 -0400 Subject: [PATCH 1/2] allow raises-exception or nbval-raises-exception to continue --- notebook/static/notebook/js/codecell.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/notebook/static/notebook/js/codecell.js b/notebook/static/notebook/js/codecell.js index d29e02fd0a..fe8664a384 100644 --- a/notebook/static/notebook/js/codecell.js +++ b/notebook/static/notebook/js/codecell.js @@ -310,7 +310,18 @@ define([ } if (stop_on_error === undefined) { - stop_on_error = true; + if (this.metadata !== undefined && + this.metadata.tags !== undefined) { + if (this.metadata.tags.indexOf('raises-exception') !== -1) { + stop_on_error = false; + } else if (this.metadata.tags.indexOf('nbval-raises-exception') !== -1) { + stop_on_error = false; + } else { + stop_on_error = true; + } + } else { + stop_on_error = true; + } } this.clear_output(false, true); From 4cfa7f65d57b3e727b67cb6024afa88316aa9da5 Mon Sep 17 00:00:00 2001 From: Michael Scott Cuthbert Date: Thu, 8 Jun 2017 14:50:09 -0400 Subject: [PATCH 2/2] Remove nbval version from code --- notebook/static/notebook/js/codecell.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/notebook/static/notebook/js/codecell.js b/notebook/static/notebook/js/codecell.js index fe8664a384..a5b2567c36 100644 --- a/notebook/static/notebook/js/codecell.js +++ b/notebook/static/notebook/js/codecell.js @@ -314,8 +314,6 @@ define([ this.metadata.tags !== undefined) { if (this.metadata.tags.indexOf('raises-exception') !== -1) { stop_on_error = false; - } else if (this.metadata.tags.indexOf('nbval-raises-exception') !== -1) { - stop_on_error = false; } else { stop_on_error = true; }