Skip to content

Commit f39a470

Browse files
author
Bozhidar Batsov
committed
[Fix #668] Handle stderr in default handler
1 parent eac2bdd commit f39a470

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

nrepl-client.el

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,16 @@ DONE-HANDLER, and EVAL-ERROR-HANDLER as appropriate."
299299
(funcall done-handler buffer))))))))
300300

301301
;;; communication
302-
(defun nrepl-default-handler (response)
302+
(defun nrepl-default-handler ()
303303
"Default handler which is invoked when no handler is found.
304304
Handles message contained in RESPONSE."
305-
(nrepl-dbind-response response (out _value)
306-
(cider-repl-emit-interactive-output out)))
305+
(nrepl-make-response-handler (cider-current-repl-buffer)
306+
'()
307+
(lambda (buffer out)
308+
(cider-repl-emit-interactive-output buffer out))
309+
(lambda (buffer err)
310+
(cider-repl-emit-err-output buffer err))
311+
'()))
307312

308313
(defun nrepl-dispatch (response)
309314
"Dispatch the RESPONSE to associated callback.
@@ -317,7 +322,7 @@ could be received even for requests with status \"done\"."
317322
(gethash id nrepl-completed-requests))))
318323
(if callback
319324
(funcall callback response)
320-
(nrepl-default-handler response)))))
325+
((nrepl-default-handler) response)))))
321326

322327
(defun nrepl-decode-current-buffer ()
323328
"Decode the data in the current buffer.

0 commit comments

Comments
 (0)