Re: failure than error
Paulo Moura <[email protected]>
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
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:[email protected]> <http://www.di.ubi.pt/~pmoura> <http://www.logtalk.org> -----------------------------------------------------------