feature/eval: improve REPL error handling
Emit more informative error messages depending on the problem.
This commit is contained in:
parent
a49a9fee3a
commit
ea857aa553
1 changed files with 6 additions and 3 deletions
|
@ -24,9 +24,12 @@
|
||||||
(if (commandp command)
|
(if (commandp command)
|
||||||
(call-interactively command)
|
(call-interactively command)
|
||||||
(funcall command))))
|
(funcall command))))
|
||||||
(unless (bufferp buffer)
|
(cond ((null buffer)
|
||||||
(error "REPL command didn't return a buffer"))
|
(error "REPL handler %S couldn't open the REPL buffer" command))
|
||||||
(with-current-buffer buffer (+eval-repl-mode +1))
|
((not (bufferp buffer))
|
||||||
|
(error "REPL handler %S failed to return a buffer" command)))
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(+eval-repl-mode +1))
|
||||||
(puthash key buffer +eval-repl-buffers)
|
(puthash key buffer +eval-repl-buffers)
|
||||||
buffer)))
|
buffer)))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue