[Top][All Lists]

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

[Chicken-users] A couple of questions about exceptions

From: john
Subject: [Chicken-users] A couple of questions about exceptions
Date: Tue, 5 Jun 2007 21:01:21 +0100

I have a couple of general questions on exceptions.

1. When handling an exception I can print the call chain out but how
do I actually print the error?

2. When a new thread is started how do I signal an error in a
previously defined exception handler e.g. in the primordial thread.

So in the code given at the bottom.

1. If (barf2) is uncommented the error is caught but how do I print
the fact it was an unbound variable that caused it?

2. If (barf1) is uncommented I would like to handle this error outside
the current thread and in this case just use the previously defined
exception handler.



(use srfi-18)

(define (bong)
 (print "bong")
 (thread-sleep! 2)

  (thread-start! (make-thread bong))
  (thread-sleep! 10))
 (print-error-message "barfed!!!")

reply via email to

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