From: Tobias C. R. <tc...@fr...> - 2008-05-17 15:06:27
|
"Willem Broekema" <met...@gm...> writes: > In CLPython, certain Python syntax errors are detected during > macroexpansion, and they throw my own SyntaxError condition. I'd like > to handle these errors myself, instead of having the SBCL compiler > catch and report them. The below patch makes that possible, by > introducing the boolean *trap-macroexpand-errors*. The CLHS entry of COMPILE explicitly states: ``compile is permitted, but not required, to establish a handler for conditions of type error.'' So your undertaking is inherently non-portable if your SyntaxError condition inherits from ERROR. But it should work fine if it doesn't inherit from ERROR (and it does in SBCL.) -T. |