Subject: Exception/Catch

From: Lalit Jain <[email-masked]>
Date: Tue, 5 Sep 2000 17:46:48 -0700 (PDT)

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
---