Exception Handling? Impossible!
Robert Stroud
robert at cheviot.uucp
Tue Aug 20 02:40:50 AEST 1985
Rich Wagner (richw at ada-uts.UUCP) posted some macros for exception handling
and asked for comments and suggestions.
I can recommend an article in Software Practice & Experience by Peter Lee
a few years ago (1983, pp 389-405) which describes a series of macros and
routines which add exception handling in the style of Ada or Clu to C.
Basically they work by hiding a stack of setjmp/longjmp contexts inside
a macro skeleton of
BEGIN
...
EXCEPT
WHEN(exception1) ...
WHEN(exception2) ...
OTHERS ...
END
I can post the code from the article if there is enough interest.
Robert Stroud,
Computing Laboratory,
University of Newcastle upon Tyne.
UUCP ...!ukc!cheviot!robert
ARPA robert%cheviot.newcastle at ucl-cs.ARPA
More information about the Comp.lang.c
mailing list