From 263181c4164bf9f5545d9f88bd82eae49aefa266 Mon Sep 17 00:00:00 2001 From: "Jessica B. Hamrick" Date: Fri, 26 Sep 2014 18:40:14 -0700 Subject: [PATCH] Report the exact error that occurred --- .../static/notebook/js/notificationarea.js | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/IPython/html/static/notebook/js/notificationarea.js b/IPython/html/static/notebook/js/notificationarea.js index 5c231c283..feef3da0b 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",