From 21638c150eddb7884f24e91208caa463d3b4f856 2014-09-30 17:50:09 From: Jessica B. Hamrick Date: 2014-09-30 17:50:09 Subject: [PATCH] Report the exact error that occurred --- diff --git a/IPython/html/static/notebook/js/notificationarea.js b/IPython/html/static/notebook/js/notificationarea.js index 5c231c2..feef3da 100644 --- a/IPython/html/static/notebook/js/notificationarea.js +++ b/IPython/html/static/notebook/js/notificationarea.js @@ -184,11 +184,23 @@ define([ }); }); - this.events.on('start_failed.Session',function () { - var msg = 'We were unable to start the kernel. This might ' + - 'happen if the notebook was previously run with a kernel ' + - 'that you do not have installed. Please choose a different kernel, ' + - 'or install the needed kernel and then refresh this page.'; + this.events.on('start_failed.Session',function (session, xhr, status, error) { + var msg = $('
'); + msg.append($('
') + .text('We were unable to start the kernel. This might ' + + 'happen if the notebook was previously run with a kernel ' + + 'that you do not have installed. Please choose a different kernel, ' + + 'or install the needed kernel and then refresh this page.') + .css('margin-bottom', '1em')); + + msg.append($('
') + .text('The exact error was:') + .css('margin-bottom', '1em')); + + msg.append($('
') + .attr('class', 'alert alert-danger') + .attr('role', 'alert') + .text(JSON.parse(status.responseText).message)); dialog.modal({ title: "Failed to start the kernel",