From lalit@savvion.com  Wed Sep  6 02:47:10 2000
Received: from oahu.savvion.com (oahu.savvion.com [206.40.33.137])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id CAA20242
	for <prolog@swi.psy.uva.nl>; Wed, 6 Sep 2000 02:47:09 +0200 (MET DST)
Received: from neptune.tdiinc.com (lalit@neptune.savvion.com [10.1.4.46])
	by oahu.savvion.com (8.9.3/8.9.3) with ESMTP id RAA10691
	for <prolog@swi.psy.uva.nl>; Tue, 5 Sep 2000 17:47:57 -0700 (PDT)
Received: from localhost (lalit@localhost)
	by neptune.tdiinc.com (8.9.0/8.9.0) with ESMTP id RAA24998
	for <prolog@swi.psy.uva.nl>; Tue, 5 Sep 2000 17:46:49 -0700 (PDT)
X-Authentication-Warning: neptune.tdiinc.com: lalit owned process doing -bs
Date: Tue, 5 Sep 2000 17:46:48 -0700 (PDT)
From: Lalit Jain <lalit@savvion.com>
To: prolog@swi.psy.uva.nl
Subject: Exception/Catch
Message-ID: <Pine.GSO.4.21.0009051742040.23697-100000@neptune.tdiinc.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


If a prolog 'catch' predicate catches an exception and calls another
predicate which in turn has a 'catch' predicate. Then, if this catch
predicate throws an exception, that exception is not being caught by the
'catch'??
Is this a bug??

here's an example:


ifoo(1).
ibar(1).
foo(X) :-
	ifoo(X);throw(nofoo).
bar(X) :-
	ibar(X);throw(nobar).

abar(X) :-
	catch(bar(X), nobar, write('nobar')).
afoo(X) :-
	catch(foo(X), nofoo, abar(X)).

:- afoo(2) => should print 'nobar', however its throws exception 'nobar'??


Thanks,
Lalit.

---							
Lalit Kumar Jain	SavVion Inc.
@ 408-330-3431		http://www.savVion.com
---			


