mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 11:39:46 -05:00
marionette: Make it easier to debug REPL read failures.
Log the remaining contnet written to the REPL, so that there's more to go on than: socket:5:14: Unknown # object: "#<" * gnu/build/marionette.scm (marionette-eval): Catch exceptions from read and log the remainder of the content from the REPL.
This commit is contained in:
parent
d0376f6718
commit
0f46d4f147
1 changed files with 12 additions and 1 deletions
|
@ -178,7 +178,18 @@ (define (marionette-eval exp marionette)
|
|||
(($ <marionette> command pid monitor (= force repl))
|
||||
(write exp repl)
|
||||
(newline repl)
|
||||
(read repl))))
|
||||
(with-exception-handler
|
||||
(lambda (exn)
|
||||
(simple-format
|
||||
(current-error-port)
|
||||
"error reading marionette response: ~A
|
||||
remaining response: ~A\n"
|
||||
exn
|
||||
(get-line repl))
|
||||
(raise-exception exn))
|
||||
(lambda ()
|
||||
(read repl))
|
||||
#:unwind? #t))))
|
||||
|
||||
(define* (wait-for-file file marionette
|
||||
#:key (timeout 10) (read 'read))
|
||||
|
|
Loading…
Reference in a new issue