guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lazy-handler-dispatch and debug-on-error


From: Neil Jerram
Subject: lazy-handler-dispatch and debug-on-error
Date: 12 Nov 2003 23:18:20 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Is there any reason why the lazy-catch around the main REPL loop in
boot-9.scm could not be changed from 

              (lazy-catch #t
                          (lambda () <REPL>)
                          lazy-handler-dispatch)
to
              (lazy-catch #t
                          (lambda () <REPL>)
                          (lambda args
                            (apply lazy-handler-dispatch args)))
?

The difference is that with this change, if code executed inside
<REPL> set!s lazy-handler-dispatch to a new definition, the new
definition takes effect on the first throw from the lazy catch.
Whereas without the change it only takes effect on a throw from the
next time that the lazy catch is entered.

I'm currently interested in this because it's a way of supporting some
debug-on-error function for code executed in the Guile REPL - see
debug-on-error in debugger.scm for details.  It's not a good way of
doing debug-on-error, as it doesn't help with script (guile -s) code
or with any throws that are caught by an inner catch.  But it's the
only mechanism currently available, I believe.

Thanks,
        Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]