[plt-scheme] 369.2

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Dec 23 21:08:36 EST 2006

At Fri, 22 Dec 2006 02:12:56 -0700, Dave Herman wrote:
> > The default error escape handler aborts the current continuation using
> > the default continuation prompt tag, supplying the `void' procedure as
> > the abort argument. In general, escape handlers that use
> 
> Does this mean that the default error escape handler is almost never 
> actually used in practice?

No, it's used by the default uncaught-exception handler.

Unlike before, you practically never want to change the error-escape
handler. Instead, you want to adjust escape behavior by installing a
prompt.

> For example, uncaught exceptions at the REPL 
> give you a stack trace, whereas the above suggests they would just 
> silently swallow the error and return to the next prompt.

Exception handling happens in two parts: print some error message (and
maybe a stack trace), and then escape.

You see an error message from the first part, and then the second part
escapes (via the error-escape handler) to the prompt.

> > `abort-current-continuation' can work in any continuation (unlike abort
> > handlers that jump to an escape continuation), so the error escape
> > handler is also inherited as-is by new threads.
> 
> The seems to be mis-documented: it's spelled `abort-continuation-prompt' 
> in the docs rather than `abort-current-continuation'.

Right --- fixed for the next doc build.

Matthew



Posted on the users mailing list.