SWI-Prolog : Constructing Exceptions
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.
.
Relevant Pages
- Re: Ole Automation of Project 2000
... > Project and read/save data to Excel for analysis. ... Reading a blank line causes my application to ... > an exception but I have not been able to track down the source of the ... I have experimented with the windows function VarIsEmpty, ... (microsoft.public.project.vba) - Re: java.sql.SQLException: ResultSet is from UPDATE. No Data.
... 'findFoodCode' doesn't hold a query, rather it holds an update statement, thus 'executeQuery' will always throw an exception. ... I'm not clear how that you are reading the metadata pertains to the comments you've received. ... Presumably the error message refers to the line of code that threw the exception, and that exception occurred prior to the 'getMetaData' call. ... Line numbers, details of the contents of the SQL statement, stack traces - all these data point you to the actual problem, and thence to the solution. ... (comp.lang.java.databases) - Re: How do I know whether a mail is replied/forwarded ?
... But I started getting one exception while reading "Undeliverable Mails(by ... Dim cdoSession As MAPI.Session ... Dim objmsg As MAPI.Message ... (microsoft.public.outlook.program_vba) - Re: Thoughts on the Foundation series...
... the kind of works you have had repeated continous history of liking ... ... Take a risk on [reading] the kinds of works you haven't liked in the past ... Of course you may have meant that the rare one in a million exception might ... I'm not -- I'm saying I'm not drawn to it, ... (rec.arts.sf.written) - Re: UI freeze and thread problems
... My problem is the UI freezes when restored after ... I have a separate thread which does the reading and updates the UI [two ... exception is the test I am using for checking this. ... Are you using BeginInvoke when working with the controls on the UI ... (microsoft.public.dotnet.languages.csharp) |
|