Re: failure than error
Erick Alphonse <[email protected]>
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
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