From 14760704b247be865031fdbec151d8b2825e9c96 Mon Sep 17 00:00:00 2001 From: moratori Date: Fri, 17 Jun 2022 20:11:55 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E5=87=BA?= =?UTF-8?q?=E5=8A=9B=E6=99=82=E3=81=AE=E3=82=A8=E3=83=A9=E3=83=BC=E3=83=8F?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=92=E6=94=B9?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rendertree.lisp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/rendertree.lisp b/src/rendertree.lisp index 0fb1e6c..2cc7d3a 100644 --- a/src/rendertree.lisp +++ b/src/rendertree.lisp @@ -121,10 +121,13 @@ (multiple-value-bind (nodes edges) (%collect-graphviz-node-and-edges target-clause 1) - (with-open-file (handle output :direction :output :if-exists :supersede) - (format handle "digraph refutation_tree {~%") - (format handle "~{ ~A~%~}~%" nodes) - (format handle "~{ ~A~%~}~%" edges) - (format handle "}"))))) - + (handler-case + (with-open-file (handle output :direction :output :if-exists :supersede) + (format handle "digraph refutation_tree {~%") + (format handle "~{ ~A~%~}~%" nodes) + (format handle "~{ ~A~%~}~%" edges) + (format handle "}")) + (condition (con) + (declare (ignore con)) + (format *standard-output* "unable to write file: ~A~%" output))))))