chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Debugging -- truncating the call-history report?


From: felix winkelmann
Subject: Re: [Chicken-users] Debugging -- truncating the call-history report?
Date: Mon, 29 May 2006 06:29:31 +0200

On 5/26/06, Graham Fawcett <address@hidden> wrote:
First, let me ask the short question: when an uncaught exception
occurs, is there a way to prevent exception-handler code from
appearing in the call-history report?

What you can do is the following: put the code that prints the
exception in a separate file, compile it with -d0 (so that no
debug-output appears). The invocation can be wrapped in
a ##core#app form (which is the same as a procedure-call,
but unsafe, and it doesn't generate a trace-info entry).
Here some untested code:

; handle.scm
(define (handle thunk)
 (handle-exceptions ex (begin ...)
   (thunk) ) )

; use.scm

(define-macro (section . body)
 `(##core#app handle
    (lambda () ,@body) ) )


(felix)




reply via email to

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