home *** CD-ROM | disk | FTP | other *** search
- 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
- From: dhandly@hpcuhe.cup.hp.com (Dennis Handly)
- Newsgroups: comp.sys.hp
- Subject: Re: Bad escape codes on 9000/720?
- Message-ID: <31480312@hpcuhe.cup.hp.com>
- Date: 23 Jan 93 19:15:39 GMT
- References: <1993Jan5.170026.16862@brtph560.bnr.ca>
- Organization: Hewlett-Packard Cal Language Lab
- Lines: 69
-
- >/ / rjohns@brtph46.BNR.CA (Richard Johns P205) / 11:42 am Jan 19, 1993 /
- >>What kind of processing are you doing where the CASE statement isn't good
- >>enough? Or you could do it with a few IFs?
-
- >I'm having trouble keeping up with you. First you imply that it's unnecessary
- >to use a big case statement to report the 70 or so runtime escape codes, and
-
- I envision that you would only check for a few escapecodes and abort on
- the rest. The drawback of using TRY/RECOVER is that you no longer get
- a nice message. Is that the problem you are trying to solve?
-
- >explain that there's a better way to translate escape codes into numbers I can
- >use to look up in the paserrs file. So I say you might as well tell us about
- >it in the documentation, and you say it's better to use a case, or just print
- >the error number and let the user look up the error in some obscure manual
- >they'd rather not know about.
-
- I admit my view is pretty narrow. I'm probably assuming that a CASE or IF
- with the most frequent cases are handled. And if an infrequent case occurs
- then it can be looked up in the Pascal manual or pasesc.ph.
- (I agree that instead of seeing error 46006464 I would rather see Pascal
- error 702. And we'll document the format of the escapecode.)
-
- >On the 400 series, I have a simple, extremely maintainable way of handling
- >system and i/o errors. I look up the error and print the message.
-
- And then what do you do after that?
- Was it documented how to print the message?
-
- >I don't
- >have to add new case clauses, like when HP realizes a bunch of error codes are
- >off by one, I don't have to write a 70-clause case statement,
-
- In the case of off by one, you wouldn't be able to get the messages out of
- the catalog. i.e. neither the Pascal compiler or runtime uses that file.
-
- It just does: x * hex('10000') + 192
-
- >I don't have to
- >reverse engineer anything, and my users don't see cryptic messages like,
- >"Paserr 46006464. Please find it in /usr/include/pasesc.ph and look up the
- >corresponding code in /usr/lib/paserrs." Or whatever.
-
- Who are your users? i.e. how sophisticated are they?
-
- >So sorry. I thought HP provides stuff like the message catalog utilities
- >because they think people might want to use them.
-
- I assumed that they were for users to write their own catalogs for their
- applications or for HP's catalogs to be translated into other languages
- but not for them to be used in end-user applications.
-
- Now if you were on MPE/iX and wanted to display the text of an OS
- escapecode (but not Pascal's) there is a documented set of routines and
- a manual on how to do this, but not on HP-UX that I now of.
-
- >Exactly which errors will never occur? 905 - 914, and 999?
-
- The Pascal runtime errors are 600..799.
-
- >Actually, I meant the spelling of "subsystem".
-
- Darn, I had to check the file out again. :-)
-
- >Thanks for letting us know
- >about the missing codes, though. I'm sure glad I wasn't relying on a big
- >case statement derived from pasesc.ph!
-
- Oh, you think you'll get those? :-)
-