From caba1989f40ef917e7486f41b9cd5c7e3c5c2d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Sat, 19 Nov 2016 22:10:57 +0100 Subject: [PATCH] Wrap printing *break-message* in ignore-errors This is to prevent infinite recursion if *error-output* is full. Fixes #43. --- src/lsp/top.lsp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lsp/top.lsp b/src/lsp/top.lsp index 1caa68ab7..5f9dd8496 100644 --- a/src/lsp/top.lsp +++ b/src/lsp/top.lsp @@ -1453,9 +1453,13 @@ package." ;; Like in SBCL, the error message is output through *error-output* ;; The rest of the interaction is performed through *debug-io* (finish-output) - (fresh-line *error-output*) - (terpri *error-output*) - (princ *break-message* *error-output*) + ;; We wrap the following in `ignore-errors' because error may be + ;; caused by writing to the `*error-output*', what leads to + ;; infinite recursion! + (ignore-errors + (fresh-line *error-output*) + (terpri *error-output*) + (princ *break-message* *error-output*)) (loop ;; Here we show a list of restarts and invoke the toplevel with ;; an extended set of commands which includes invoking the associated