home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / prolog / 2427 < prev    next >
Encoding:
Text File  |  1993-01-23  |  2.2 KB  |  47 lines

  1. Newsgroups: comp.lang.prolog
  2. Path: sparky!uunet!infonode!ingr!capalo!quintus!quintus!dave
  3. From: dave@quintus.com (David Bowen)
  4. Subject: Re: ISO Prolog Error?
  5. Message-ID: <1993Jan21.015937.5091@quintus.com>
  6. Sender: news@quintus.com (USENET news account)
  7. Nntp-Posting-Host: odysseus
  8. Organization: Quintus Corporation, Palo Alto, CA
  9. References:  <brady-180193171852@brady.cs.tcd.ie>
  10. Date: Thu, 21 Jan 1993 01:59:37 GMT
  11. Lines: 34
  12.  
  13. In article <brady-180193171852@brady.cs.tcd.ie>, brady@cs.tcd.ie (Michael Brady) writes:
  14. > The draft of ISO Prolog talks about error handling, and says that when an
  15. > error is discovered, an implicit throw(error(Code,Stuff)) is done, which
  16. > can be caught by a catch/3 call made previously. The contents of Code is
  17. > supposed to be one of a small number of atoms, and the Stuff is
  18. > 'implementation defined'.
  19. > My question is, is there any informal agreement on what should be in Stuff?
  20. > My specific question is about what should happen when input predicates
  21. > return with syntax errors. If the stream is a window, and the user can
  22. > correct the error, there needs to be enough information around somewhere
  23. > for the input predicate to be retried. There's a number of ways to do this,
  24. > so I wonder has any attempt at standardisation been attempted.
  25. > ---------------------
  26. > Mike Brady
  27. > Computer Science Department, Trinity College Dublin, Ireland
  28.  
  29. The next version of the draft standard will have a lot more detail on
  30. the form of terms to be thrown when errors occur in standard built-in
  31. predicates.  This is based on the U.S. proposal which is in the Annexe B of
  32. N92, if that is the version that you have, but with some changes.  So
  33. you will be able to detect the fact that a syntax error (as opposed to
  34. some other error) occurred, and you will be able to specify what to do
  35. when that happens.  Another thing to look at is the syntax_errors option
  36. to read_term, which lets you specify whether read should just keep reading,
  37. or fail, or raise an exception.  
  38.  
  39.  
  40. -- 
  41. David Bowen                Vice President Product Engineering
  42. Quintus Corporation                     InterNet:       dbowen@quintus.com
  43. 2100 Geng Road                          FAX:            415 494 7608
  44. Palo Alto, California 94303             Phone:          415 813 3800
  45.