diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index 527b9ca2a..c09a0490c 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -403,7 +403,7 @@ define([ * Execute current code cell to the kernel * @method execute */ - CodeCell.prototype.execute = function (skip_exceptions) { + CodeCell.prototype.execute = function (stop_on_error) { if (!this.kernel || !this.kernel.is_connected()) { console.log("Can't execute, kernel is not connected."); return; @@ -411,8 +411,8 @@ define([ this.active_output_area.clear_output(false, true); - if (skip_exceptions === undefined) { - skip_exceptions = false; + if (stop_on_error === undefined) { + stop_on_error = true; } // Clear widget area @@ -439,7 +439,7 @@ define([ var old_msg_id = this.last_msg_id; this.last_msg_id = this.kernel.execute(this.get_text(), callbacks, {silent: false, store_history: true, - skip_exceptions : skip_exceptions}); + stop_on_error : stop_on_error}); if (old_msg_id) { delete CodeCell.msg_cells[old_msg_id]; } diff --git a/IPython/html/tests/notebook/execute_code.js b/IPython/html/tests/notebook/execute_code.js index ca80b9ff5..f0d22f8c4 100644 --- a/IPython/html/tests/notebook/execute_code.js +++ b/IPython/html/tests/notebook/execute_code.js @@ -83,7 +83,7 @@ casper.notebook_test(function () { IPython.notebook.insert_cell_below('code',0); var cell1 = IPython.notebook.get_cell(1); cell1.set_text('a=14; print(a)'); - cell0.execute(skip_exception=true); + cell0.execute(false); cell1.execute(); }); @@ -91,7 +91,7 @@ casper.notebook_test(function () { this.then(function () { var result = this.get_output_cell(1); - this.test.assertEquals(result.text, '14\n', 'cell execute, skip exceptions'); + this.test.assertEquals(result.text, '14\n', "cell execute, don't stop on error"); }); this.thenEvaluate(function () { @@ -108,6 +108,6 @@ casper.notebook_test(function () { this.then(function () { var result = this.get_output_cell(1); - this.test.assertNotEquals(result.text, '14\n', 'cell execute, skip exceptions'); + this.test.assertNotEquals(result.text, '14\n', 'cell execute, stop on error'); }); });