From owner-freebsd-java Thu Nov 4 8:55: 4 1999 Delivered-To: freebsd-java@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 2CB2F153B5 for ; Thu, 4 Nov 1999 08:55:01 -0800 (PST) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.2/8.9.2) id IAA84330; Thu, 4 Nov 1999 08:54:23 -0800 (PST) From: Archie Cobbs Message-Id: <199911041654.IAA84330@bubba.whistle.com> Subject: Re: try { } catch { } finally { } in C! In-Reply-To: <199911040535.WAA13295@mt.sri.com> from Nate Williams at "Nov 3, 1999 10:35:49 pm" To: nate@mt.sri.com (Nate Williams) Date: Thu, 4 Nov 1999 08:54:23 -0800 (PST) Cc: freebsd-java@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Nate Williams writes: > > > > Did you know that try { } catch { } finally { } is possible from C? > > > > Well, GNU C anyway.. > > > > > > Cool. As long as your program isn't using setjmp/longjmp, it works. :) > > > > I think it would still work even if it was... different jump buffers.. ? > > Hmmm......, I'm not sure. I know that someone just posted about an > error they had using the thread libraries and setjmp(), but you could be > right. I was wondering about this very thing last night working on the > JDK.... Of course, if you longjmp() from within a try {} block, the finally part wouldn't get run.. Also I think some thread libraries use setjmp/longjmp in order to do context switching, so that could definitely confuse things. Anyway, it should work OK in 'standard' programs.. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message