chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] catching errors at macro expansion time


From: Michele Simionato
Subject: [Chicken-users] catching errors at macro expansion time
Date: Mon, 13 Jun 2005 14:33:53 +0000

It looks like "handle-exception" cannot handles exceptions happening at macro
expansion time:

(define-macro (raise-error bool)
  (if (eq? #t bool)
      (error "error inside macro!"))
  #f)

(handle-exceptions exn (print "error caught")
                   (raise-error #t))

The error is NOT caught. Is this the right behavior?

I am writing tests for macros, and I want to catch the
error to make sure that the macro gives the expected 
error message. Any suggestion?

            Michele Simionato




reply via email to

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