From 9cd58d83904fc531f214c3bc2f506c80d816f415 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 17 Jul 2020 05:14:36 -0700 Subject: doc: add an implementation note for exceptions. * txr.1: Add remarks on the differences between how TXR Lisp and ANSI CL deal with unhandled exceptions/conditions of type error and warning. --- txr.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 45c2d091..e32cc3a9 100644 --- a/txr.1 +++ b/txr.1 @@ -42602,6 +42602,30 @@ may invoke a particular restart handler. Restart handlers are similar to exception handlers: they are functions associated with symbols in the dynamic environment. +In \*(TL, the special behavior which occurs for exceptions derived from +.code error +and those from +.code warning +is built into the exception handling system, and tied to those types. +When an error or warning exception is unhandled, the exception handling system +itself reacts, so the special behaviors occur no matter how these exceptions +are raised. In ANSI CL, the special behavior for unhandled +.code error +conditions (of invoking the debugger) is implemented only in the +.code error +function; +.code error +conditions signalled other than via that function are not subject to +any special behavior. There is a parallel situation with regard to +warnings: the +ANSI CL +.code warn +function implements a special behavior for unhandled warnings (of emitting +a diagnostic) but warnings not signalled via that function are not +treated that way. +Thus in \*(TL, there is no way to raise an error or warning that is simply +ignored due to being unhandled. + In \*(TL exceptions are a unification of conditions and restarts. From an ANSI CL perspective, \*(TL exceptions are a lot like CL restarts, except that the symbols are arranged in an inheritance hierarchy. \*(TL exceptions are used -- cgit v1.2.3