home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / hp / 15447 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  3.4 KB

  1. Path: sparky!uunet!seismo!darwin.sura.net!udel!gatech!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!hpcss01!hpcuhe!dhandly
  2. From: dhandly@hpcuhe.cup.hp.com (Dennis Handly)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Bad escape codes on 9000/720?
  5. Message-ID: <31480312@hpcuhe.cup.hp.com>
  6. Date: 23 Jan 93 19:15:39 GMT
  7. References: <1993Jan5.170026.16862@brtph560.bnr.ca>
  8. Organization: Hewlett-Packard Cal Language Lab
  9. Lines: 69
  10.  
  11. >/ / rjohns@brtph46.BNR.CA (Richard Johns P205) / 11:42 am  Jan 19, 1993 /
  12. >>What kind of processing are you doing where the CASE statement isn't good
  13. >>enough?  Or you could do it with a few IFs?
  14.  
  15. >I'm having trouble keeping up with you.  First you imply that it's unnecessary
  16. >to use a big case statement to report the 70 or so runtime escape codes, and 
  17.  
  18. I envision that you would only check for a few escapecodes and abort on
  19. the rest.  The drawback of using TRY/RECOVER is that you no longer get
  20. a nice message.  Is that the problem you are trying to solve?
  21.  
  22. >explain that there's a better way to translate escape codes into numbers I can 
  23. >use to look up in the paserrs file.  So I say you might as well tell us about 
  24. >it in the documentation, and you say it's better to use a case, or just print
  25. >the error number and let the user look up the error in some obscure manual 
  26. >they'd rather not know about.
  27.  
  28. I admit my view is pretty narrow.  I'm probably assuming that a CASE or IF
  29. with the most frequent cases are handled.  And if an infrequent case occurs
  30. then it can be looked up in the Pascal manual or pasesc.ph.
  31. (I agree that instead of seeing error 46006464 I would rather see Pascal
  32. error 702.  And we'll document the format of the escapecode.)
  33.  
  34. >On the 400 series, I have a simple, extremely maintainable way of handling
  35. >system and i/o errors.  I look up the error and print the message.
  36.  
  37. And then what do you do after that?
  38. Was it documented how to print the message?
  39.  
  40. >I don't
  41. >have to add new case clauses, like when HP realizes a bunch of error codes are
  42. >off by one, I don't have to write a 70-clause case statement,
  43.  
  44. In the case of off by one, you wouldn't be able to get the messages out of
  45. the catalog.  i.e. neither the Pascal compiler or runtime uses that file.
  46.  
  47.     It just does:    x * hex('10000') + 192
  48.  
  49. >I don't have to 
  50. >reverse engineer anything, and my users don't see cryptic messages like, 
  51. >"Paserr 46006464.  Please find it in /usr/include/pasesc.ph and look up the
  52. >corresponding code in /usr/lib/paserrs."  Or whatever.
  53.  
  54. Who are your users?  i.e. how sophisticated are they?
  55.  
  56. >So sorry.  I thought HP provides stuff like the message catalog utilities
  57. >because they think people might want to use them.
  58.  
  59. I assumed that they were for users to write their own catalogs for their
  60. applications or for HP's catalogs to be translated into other languages
  61. but not for them to be used in end-user applications.
  62.  
  63. Now if you were on MPE/iX and wanted to display the text of an OS
  64. escapecode (but not Pascal's) there is a documented set of routines and
  65. a manual on how to do this, but not on HP-UX that I now of.
  66.  
  67. >Exactly which errors will never occur?  905 - 914, and 999?
  68.  
  69. The Pascal runtime errors are 600..799.
  70.  
  71. >Actually, I meant the spelling of "subsystem".
  72.  
  73. Darn, I had to check the file out again.  :-)
  74.  
  75. >Thanks for letting us know
  76. >about the missing codes, though.  I'm sure glad I wasn't relying on a big
  77. >case statement derived from pasesc.ph!
  78.  
  79. Oh, you think you'll get those?  :-)
  80.