Use the execute-reply callback to check for errors

This seems to be the more general way to check for errors.
This commit is contained in:
Nathaniel Nicandro 2018-01-22 20:21:24 -06:00
parent b2d8dfc2a7
commit 78174f4334

View file

@ -1430,11 +1430,12 @@ displayed without anything showing up in the REPL buffer."
:code code)))
(setf (jupyter-request-run-handlers-p req) (not silently))
(jupyter-add-callback req
:error (lambda (msg)
(cl-destructuring-bind (&key ename evalue &allow-other-keys)
(jupyter-message-content msg)
(message "jupyter (%s): %s" ename
(xterm-color-filter evalue))))
:execute-reply (lambda (msg)
(cl-destructuring-bind (&key status ename evalue &allow-other-keys)
(jupyter-message-content msg)
(unless (equal status "ok")
(message "jupyter (%s): %s" ename
(xterm-color-filter evalue)))))
:execute-result
(lambda (msg)
(let ((res (jupyter-message-data msg :text/plain)))