mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Better error message when kernel is not ready
This commit is contained in:
parent
a6efd03906
commit
6279ba729a
1 changed files with 4 additions and 4 deletions
|
@ -267,7 +267,7 @@ The kernel will no longer be responsive.")))
|
||||||
(declare (indent 1))
|
(declare (indent 1))
|
||||||
`(if (ein:kernel-ready-p ,kernel)
|
`(if (ein:kernel-ready-p ,kernel)
|
||||||
(progn ,@body)
|
(progn ,@body)
|
||||||
(ein:log 'warn "Kernel is not ready yet!")))
|
(ein:log 'warn "Kernel is not ready yet! (or closed already.)")))
|
||||||
|
|
||||||
|
|
||||||
;;; Main public methods
|
;;; Main public methods
|
||||||
|
@ -293,7 +293,7 @@ the second argument.
|
||||||
`object_into_reply' message is documented here:
|
`object_into_reply' message is documented here:
|
||||||
http://ipython.org/ipython-doc/dev/development/messaging.html#object-information
|
http://ipython.org/ipython-doc/dev/development/messaging.html#object-information
|
||||||
"
|
"
|
||||||
(assert (ein:kernel-ready-p kernel))
|
(assert (ein:kernel-ready-p kernel) nil "Kernel is not active.")
|
||||||
(when objname
|
(when objname
|
||||||
(let* ((content (list :oname (format "%s" objname)))
|
(let* ((content (list :oname (format "%s" objname)))
|
||||||
(msg (ein:kernel--get-msg kernel "object_info_request" content))
|
(msg (ein:kernel--get-msg kernel "object_info_request" content))
|
||||||
|
@ -349,7 +349,7 @@ http://ipython.org/ipython-doc/dev/development/messaging.html#messages-on-the-pu
|
||||||
The SET-NEXT-INPUT callback will be passed the `set_next_input' payload.
|
The SET-NEXT-INPUT callback will be passed the `set_next_input' payload.
|
||||||
|
|
||||||
See `ein:kernel--handle-shell-reply' for how the callbacks are called."
|
See `ein:kernel--handle-shell-reply' for how the callbacks are called."
|
||||||
(assert (ein:kernel-ready-p kernel))
|
(assert (ein:kernel-ready-p kernel) nil "Kernel is not active.")
|
||||||
(let* ((content (list
|
(let* ((content (list
|
||||||
:code code
|
:code code
|
||||||
:silent (or silent json-false)
|
:silent (or silent json-false)
|
||||||
|
@ -383,7 +383,7 @@ the `content' object of the `complete_reply' message as the second.
|
||||||
`complete_reply' message is documented here:
|
`complete_reply' message is documented here:
|
||||||
http://ipython.org/ipython-doc/dev/development/messaging.html#complete
|
http://ipython.org/ipython-doc/dev/development/messaging.html#complete
|
||||||
"
|
"
|
||||||
(assert (ein:kernel-ready-p kernel))
|
(assert (ein:kernel-ready-p kernel) nil "Kernel is not active.")
|
||||||
(let* ((content (list
|
(let* ((content (list
|
||||||
:text ""
|
:text ""
|
||||||
:line line
|
:line line
|
||||||
|
|
Loading…
Add table
Reference in a new issue