Hi, (I must confess I'd be more comfortable with the same piece of code in Scheme... Generally, I find it more convenient to have the boot code as a Guile script which then loads all the relevant pieces of C code. Scheme code is also less likely to break with future Guile versions.)
"René Köcher" <[EMAIL PROTECTED]> writes: > SCM stack = scm_fluid_ref( > SCM_VARIABLE_REF(scm_the_last_stack_fluid_var)); > SCM subr = SCM_CAR(args); > SCM mesg = SCM_CADR(args); > SCM cargs = SCM_CADDR(args); > #if 1 > /* FIXME: still wrong-type-arg error.. */ > scm_display_backtrace(stack, scm_current_error_port(), > SCM_UNDEFINED, SCM_UNDEFINED); Presumably STACK is `#f' here, can you confirm it (e.g., by `scm_write'ing it)? If so, then this means that `SCM_DEBUG_P' is somehow not taken into account. In theory, what you propose should work: guile> (define (foo x) (catch #t (lambda () (error "sdf")) (lambda args (fluid-ref the-last-stack)))) guile> (foo 2) #<stack 8050fc0:b7a8dbf0> As you can see, the error handler gets to see a valid stack when looking at THE-LAST-STACK. Thanks, Ludovic.