Frank Heckenbach wrote:
... snip ...
It's a kludge. I think it would work, but I wouldn't like to keep it permanently ... ;-)
You could arrange that the standard procedure new returns NIL for failure, and that the compiler generates all calls with a following "if p = NIL THEN trap;". This would duplicate the standard specified action, but allow for a compile time switch (or pseudo comment) to inhibit the trap action generation. Then the user can install whatever action he desires.
It also makes it easy for the normal trap action to report file:linenumber data.