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)
|
||||
(call-interactively command)
|
||||
(funcall command))))
|
||||
(unless (bufferp buffer)
|
||||
(error "REPL command didn't return a buffer"))
|
||||
(with-current-buffer buffer (+eval-repl-mode +1))
|
||||
(cond ((null buffer)
|
||||
(error "REPL handler %S couldn't open the REPL buffer" command))
|
||||
((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)
|
||||
buffer)))
|
||||
(with-current-buffer buffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue