inferior: Propagate '&store-protocol-error' error conditions.
authorLudovic Courtès <ludo@gnu.org>
Fri, 20 Sep 2019 20:26:53 +0000 (22:26 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sat, 21 Sep 2019 14:48:36 +0000 (16:48 +0200)
commit71507435225f10d8d944ba183cbcc77ef953e0e5
tree083c80e7362c7039318d961874503f98768a3238
parenta43e9157ef479e94c19951cc9d228cf153bf78ee
inferior: Propagate '&store-protocol-error' error conditions.

Until now '&store-protocol-error' conditions raised in the inferior
would not be correctly propagated because SRFI-35 records lack a read
syntax.

Reported at <https://bugs.gnu.org/37449>
by Carl Dong <contact@carldong.me>.

* guix/inferior.scm (port->inferior): Import (srfi srfi-34) in the inferior.
(inferior-eval-with-store): Define 'error?' and 'error-message'.  Wrap
call to PROC in 'guard'.  Check the response of INFERIOR for a
'store-protocol-error' or a 'result' tag.
* tests/inferior.scm ("inferior-eval-with-store, &store-protocol-error"):
New test.
guix/inferior.scm
tests/inferior.scm