aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-10-30 13:49:03 +0100
committerThomas White <taw@physics.org>2022-10-30 13:49:03 +0100
commit83130ff9f6768e6b139eabdbd184571cc3c3d32c (patch)
tree510d5750e7860534248400449eadc24b36e33f1f
parent306562f867ca7f64d37228dc864c788621970953 (diff)
Fixture display: Bail out if we get a Scheme error
-rw-r--r--src/repl-connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/repl-connection.c b/src/repl-connection.c
index 2e3201f..72446e7 100644
--- a/src/repl-connection.c
+++ b/src/repl-connection.c
@@ -153,6 +153,12 @@ static void input_ready(GObject *source, GAsyncResult *res, gpointer vp)
printf("Prompt!\n");
repl->input[0] = '\0';
}
+ if ( strncmp(remaining, "Entering a new prompt", 21) == 0 ) {
+ fprintf(stderr, "Scheme error!\n");
+ g_object_unref(repl->conn);
+ repl->conn = NULL;
+ return;
+ }
free(remaining);
g_input_stream_read_async(g_io_stream_get_input_stream(G_IO_STREAM(repl->conn)),