From jan@swi.psy.uva.nl Sun Feb 25 10:34:52 2001
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f1P9YqZ18019;
	Sun, 25 Feb 2001 10:34:52 +0100 (MET)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id KAA27158;
	Sun, 25 Feb 2001 10:34:51 +0100
Date: Sun, 25 Feb 2001 10:34:51 +0100
Message-Id: <200102250934.KAA27158@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: [SWIPL] PL_exception() side-effect?
To: Paul Singleton <p.singleton@keele.ac.uk>,
   SWI Prolog <prolog@swi.psy.uva.nl>
In-Reply-To: Paul Singleton's message of Fri, 23 Feb 2001 22:57:27 +0000
Phone: +31 - 20 - 525 6121

> If a call to PL_exception() returns a non-zero term reference, is
> the exception no longer registered?

PL_exception() returns non-zero if an exception is pending and the
return-value is a term-reference holding the exception-term.  If
it returns zero, no exception is pending.

An interesting question is whether it is possible for PL_exception()
to return an invalid term-reference.  The value is guaranteed to be
trustworthy after a call to Prolog returns failure.  It can be destroyed
using one of the foreign-frame rewind functions.

Maybe you should be clearer on how you wish to use it.

	--- Jan

