Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site cheviot.uucp
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!cheviot!robert
From: robert@cheviot.uucp (Robert Stroud)
Newsgroups: net.lang.c
Subject: Re: Exception Handling?  Impossible!
Message-ID: <414@cheviot.uucp>
Date: Mon, 19-Aug-85 12:40:50 EDT
Article-I.D.: cheviot.414
Posted: Mon Aug 19 12:40:50 1985
Date-Received: Sat, 24-Aug-85 01:09:02 EDT
References: <10200002@ada-uts.UUCP>
Reply-To: robert@cheviot.UUCP (Robert Stroud)
Organization: U. of Newcastle upon Tyne, U.K.
Lines: 25

Rich Wagner (richw@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@ucl-cs.ARPA