home *** CD-ROM | disk | FTP | other *** search
- ----------------------------------------------------------------------
-
- From: Steve Glaser <steveg%hammer.TEK%tektronix.csnet@csnet-relay.arpa>
- To: tektronix!ut-sally!std-unix@tektronix.CSNET,
- tektronix!std-unix%ut-sally.arpa@tektronix.CSNET
- Date: Mon, 5 Aug 85 17:58:33 PDT
- Subject: Re: standardized error messages
-
- in Chris Torek's error example, please change:
-
- > if (e > 0) {
- > p = e < sys_nerr ? sys_errlist[e] : "unknown error";
- > (void) fprintf(stderr, ": %s", p);
- > }
-
- to:
-
- > if (e > 0) {
- > if (e < sys_nerr)
- > (void) fprintf(stderr, ": %s", sys_errlist[e]);
- > else
- > (void) fprintf(stderr, ": unknown error number %d", e);
- > }
-
- It's most annoying when an error message printing routine throws away
- information. Especially when you have new error codes cropping up and
- programs that don't get recompiled (or at least relinked).
-
- At least Chris checked against sys_nerr. I've seen may programs that
- don't bother and end up printing gibberish when a new error comes along.
-
- Steve Glaser
- tektronix!steveg
-
- ------------------------------
-
- Discussions-Of: UNIX standards, particularly the IEEE P1003 draft standard.
- Submissions-To: ut-sally!std-unix or std-unix@ut-sally.ARPA
- Comments-To: ut-sally!std-unix-request or std-unix-request@ut-sally.ARPA
- UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix
- Archives-In: ~ftp/pub/mod.std.unix on ut-sally.ARPA (soon sally.UTEXAS.EDU)
-
- Volume-Number: Volume 1, Number 50
-
-