🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2403

Re: ISO Prolog Error?

#2403
From: David Bowen
Date: Thu, 21 Jan 1993 01:59
34 lines
2311 bytes
In article <brady-180193171852@brady.cs.tcd.ie>, brady@cs.tcd.ie (Michael Brady) writes:
> The draft of ISO Prolog talks about error handling, and says that when an
> error is discovered, an implicit throw(error(Code,Stuff)) is done, which
> can be caught by a catch/3 call made previously. The contents of Code is
> supposed to be one of a small number of atoms, and the Stuff is
> 'implementation defined'.
> 
> My question is, is there any informal agreement on what should be in Stuff?
> My specific question is about what should happen when input predicates
> return with syntax errors. If the stream is a window, and the user can
> correct the error, there needs to be enough information around somewhere
> for the input predicate to be retried. There's a number of ways to do this,
> so I wonder has any attempt at standardisation been attempted.
> 
> ---------------------
> Mike Brady
> Computer Science Department, Trinity College Dublin, Ireland

The next version of the draft standard will have a lot more detail on
the form of terms to be thrown when errors occur in standard built-in
predicates.  This is based on the U.S. proposal which is in the Annexe B of
N92, if that is the version that you have, but with some changes.  So
you will be able to detect the fact that a syntax error (as opposed to
some other error) occurred, and you will be able to specify what to do
when that happens.  Another thing to look at is the syntax_errors option
to read_term, which lets you specify whether read should just keep reading,
or fail, or raise an exception.  


-- 
David Bowen				Vice President Product Engineering
Quintus Corporation                     InterNet:       dbowen@quintus.com
2100 Geng Road                          FAX:            415 494 7608
Palo Alto, California 94303             Phone:          415 813 3800
Technical Details
Message-ID: <1993Jan21.015937.5091@quintus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!infonode!ingr!capalo!quintus!quintus!dave
References: <brady-180193171852@brady.cs.tcd.ie>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.prolog
Path: arc1-ca.pugleaf.net!sparky!uunet!infonode!ingr!capalo!quintus!quintus!dave
From: dave@quintus.com (David Bowen)
Subject: Re: ISO Prolog Error?
Message-ID: <1993Jan21.015937.5091@quintus.com>
Sender: news@quintus.com (USENET news account)
Nntp-Posting-Host: odysseus
Organization: Quintus Corporation, Palo Alto, CA
References:  <brady-180193171852@brady.cs.tcd.ie>
Date: Thu, 21 Jan 1993 01:59:37 GMT
Lines: 34