inferior: Distinguish inferior exceptions.
authorLudovic Courtès <ludo@gnu.org>
Tue, 10 Mar 2020 15:45:57 +0000 (16:45 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 12 Mar 2020 10:52:38 +0000 (11:52 +0100)
commitf7537e30b892cef09d91902547c00e5fa9b66f3b
tree7d8930fbc636ba627f324bd429c80e351df0e7ae
parentc00ae79cca7f4b1c95669c5857c0e55e1b253f4f
inferior: Distinguish inferior exceptions.

This avoids ambiguities when looking at a backtrace where the exception
was actually thrown by an inferior in a very different context.

* guix/inferior.scm (&inferior-exception): New condition type.
(read-repl-response): Add optional 'inferior' parameter.  Raise
'&inferior-exception' instead of rethrowing to KEY when receiving an
'exception' message.
(read-inferior-response): Pass INFERIOR to 'read-repl-response'.
* tests/inferior.scm ("&inferior-exception"): New test.
guix/inferior.scm
tests/inferior.scm