Use stop_on_error instead of skip_exceptions

pull/37/head
Juergen Hasch 11 years ago committed by Min RK
parent 2f50bf9980
commit eb7d0b7e07

@ -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];
}

@ -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');
});
});

Loading…
Cancel
Save