[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: failure than error
From: |
Paulo Moura |
Subject: |
Re: failure than error |
Date: |
Mon, 25 Oct 2004 11:49:44 +0100 |
On 25/out/2004, at 11:41, Takushi Tanaka wrote:
Hello Mr. Gnu-Prolog,
When a goal is neither a fact nor a rule-head,
Gnu-Prolog outputs "uncaught exception: error(...)".
Though it is useful to check typing error, I want to
treat the goal as new predicate for Prolog.
Is it possible to treat the goal as failure rather
than error?
Try:
| ?- catch(Your_Goal, _, fail).
Cheers,
Paulo
-----------------------------------------------------------
Paulo Jorge Lopes de Moura
Dep. of Informatics Office 4.3 Ext. 3257
University of Beira Interior Phone: +351 275319700
6201-001 Covilhã Fax: +351 275319891
Portugal
<mailto:address@hidden>
<http://www.di.ubi.pt/~pmoura> <http://www.logtalk.org>
-----------------------------------------------------------