syntax
( phase1-eval ct-exprmaybe-quotemaybe-catch?)
maybe-quote =| #:quotequote-idmaybe-catch? =| #:catch?catch?
If catch? is #t, then if the evaluation of ct-expr raises a compile-time exception, it is caught and converted to a run-time exception.
'(struct:point point point? (point-y point-x) (#f #f) #t)
#<syntax (struct:point point point? (point-y point-x) (#f #f) #t)>
Added in version 6.3 of package base.
syntax
( convert-compile-time-error expr)
Use convert-compile-time-error to write tests for compile-time error checking like syntax errors:
--------------------
FAILURE
name: check-exn
location: eval:6:0
params: '(#rx"missing formals and body" #<procedure>)
message:"Wrong exception raised"
exn-message:"eval:6:0: lambda: bad syntax\nin: (lambda)"
exn:
#(struct:exn:fail:syntax "eval:6:0: lambda: bad syntax\nin: (lambda)" #<continuation-mark-set> (#<syntax:eval:6:0 (lambda)>))
--------------------
Without the use of convert-compile-time-error , the checks above would not be executed because the test program would not compile.
Added in version 6.3 of package base.
syntax
( convert-syntax-error expr)
Added in version 6.3 of package base.