SWI-Prolog : Constructing Exceptions
- From: "roschler" <robert.oschler@xxxxxxxxx>
- Date: 17 Sep 2006 06:30:25 -0700
I've been reading the 5.6 reference manual about Exceptions. I want to
construct my own and throw them. I found the manual page on Signal
handling, but I'm still a little vague on where to find the error
helper functions. For example, in one of the stock PL files
distributed with SWI-Prolog there is this line:
throw(error(permission_error(write, index_file, Dir), _))
This is a stream permission error exception I believe. Where can I
find the list of "error()" predicates so I know how to construct my
error object; especially one that will work well with "print_message"?
In my case I'm reading information from a file with get0/1, and I
intend to throw an exception if the resulting string I'm building is
too long.
Note: I want to throw the error from my own Prolog code, not from a
Foreign Language library.
Thanks.
.
- Follow-Ups:
- Re: SWI-Prolog : Constructing Exceptions
- From: Jan Wielemaker
- Re: SWI-Prolog : Constructing Exceptions
- Prev by Date: Re: The n-knights problem
- Next by Date: Re: The n-knights problem
- Previous by thread: Free Prolog libraries?
- Next by thread: Re: SWI-Prolog : Constructing Exceptions
- Index(es):
Relevant Pages
|
|