tag:blogger.com,1999:blog-17087850.post114846041685398060..comments2023-10-31T06:50:41.697-04:00Comments on Factor: a practical stack language: Better handling of undefined words; restartsSlava Pestovhttp://www.blogger.com/profile/02768382790667979877noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-17087850.post-1148575645117110332006-05-25T12:47:00.000-04:002006-05-25T12:47:00.000-04:00I think what CL does is find the condition handler...I think what CL does is find the condition handler (which is probably something like a Lisp special/global variable, dynamically scoped), and invoke it. So all this happens *on top* of the current stack and execution.<BR/><BR/>Whatever the invoked restart returns is used in the program where the exception happened. The default condition handler is the debugger, so if nothing else is registered, the system will call the debugger to return a value. That value is then used. It's interesting that all this doesn't require any stack magic (like longjmp() or throw), but only a function call in case an error happens.<BR/><BR/>So I think you could also just lookup some condition handler (or the debugger) and have it return a value to the error-throwing continuation.Anonymousnoreply@blogger.com