[bitc-dev] Exceptions in initialiser
Sam Mason
sam at samason.me.uk
Fri Jun 30 05:03:56 EDT 2006
Hi,
Another little test case for you. Throwing an exception in an initialiser
currently causes a segfault as the exception jump buffer hasn't been set
up yet. If you move the bitc_init_globals() call a couple of lines down
(below the setjmp call) it prints out the exception as expected.
I think I remember reading somewhere that initialisers shouldn't have
side-effects -- not sure where though! Should this test be rejected at
compile time then?
Sam
-------------- next part --------------
(bitc-version "0.10")
(provide main bitc.main)
(defexception exFred)
(define bar (throw exFred))
(define (main.main argVec)
bar)
More information about the bitc-dev
mailing list