|
From: | Erick Alphonse |
Subject: | Re: failure than error |
Date: | Mon, 25 Oct 2004 13:41:41 +0200 |
User-agent: | Mozilla Thunderbird 0.8 (X11/20040923) |
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?
Hello,you can also use set_prolog_flag(unknown,fail). This flag defines the behaviour when an unknown procedure is called.
error (default) an existence_error is raised warning a message is displayed then fails fail quietly fails
[Prev in Thread] | Current Thread | [Next in Thread] |