Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!howland.reston.ans.net!nntp.coast.net!torn!nott!cunews!bertrand!ceh
From: ceh@medusa.sce.carleton.ca (Curtis Hrischuk)
Subject: need to intercept existence error for facts in Quintus
X-Nntp-Posting-Host: medusa.sce.carleton.ca
Message-ID: <CEH.96Jan17084419@medusa.sce.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Organization: Carleton Univeristy, Systems & Computer Eng. Dept.
Date: Wed, 17 Jan 1996 13:44:19 GMT
Lines: 27

Hi.  I am using Quintus Prolog.  I have the following type of code

	Fact =.. [aFact, aParm, aParm2],
	Fact,

The problem I have is that if "aFact(aParm, aParm2)" does not exist I
get the following error message:
	! Existence error in somePredicate/5
	! procedure aFact/2 does not exist

Is there some way to trap this at run time?  I believe that clause/2
would help but I want to avoid the extra overhead of calling clause
(the Quintus manual even suggests this).

Any suggestions.

Thanks for your time.

Curtis
-- 
-------------------------------------------------------------------------------
| Curtis Hrischuk (PhD Cand)  | Boundaries of Science:                        |
| ceh@sce.carleton.ca         | 1) How did I get here?                        |
| Carleton University         | 2) Why am I here?                             |
| Ottawa, On. ,Canada, K1S-5B6| 3) What happens when I leave?                 |
| Ph  (613) 788-2600 x1762    | "The proof is almost identical to the previous|
| FAX (613) 788-5727          | proof and hence omitted here."(actual quote)  |
