From 8019cff7e0b756f970e2b0063aeb6c6d9f1a0ede Mon Sep 17 00:00:00 2001 From: jgart Date: Fri, 11 Feb 2022 01:23:27 -0500 Subject: topics: lisp: add note on using lisp condition system in production --- topics/lisp/define-condition.gmi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'topics/lisp') diff --git a/topics/lisp/define-condition.gmi b/topics/lisp/define-condition.gmi index 9499441..59d3f56 100644 --- a/topics/lisp/define-condition.gmi +++ b/topics/lisp/define-condition.gmi @@ -26,7 +26,7 @@ Why is condition handling special in common lisp compared to other languages? > restart exists, it can use invoke-restart to jump to the restart which > runs and then execution continues like normal after the restart-case form. -* end of coversation +-- end of coversation # Restarts, restarts, restarts: interactive choices in the debugger @@ -45,6 +45,16 @@ Why is condition handling special in common lisp compared to other languages? ;; … ``` +# Can the condition system be used in both production and for debugging? +> both, production code and debugging. Every fault that you handle manually +> using the debugger can be written down into some Lisp code; put that code +> inside a handler function and wrap a handler-bind around your toplevel and +> bam, you have achieved automatic error handling with a bit of clever +> design. You never even need to kill your program to add new handlers. It +> can simply keep on running™ + +- phoe (#common-lisp:matrix.org, feb 10) + # Video References => https://www.youtube.com/watch?v=9K5YVbeatHs Common Lisp Study Group: Conditions and Restarts -- cgit v1.2.3