Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utcsri!greg From: greg@utcsri.UUCP Newsgroups: comp.lang.c Subject: Re: Pet peeve #1473 Message-ID: <5315@utcsri.UUCP> Date: Wed, 26-Aug-87 12:42:48 EDT Article-I.D.: utcsri.5315 Posted: Wed Aug 26 12:42:48 1987 Date-Received: Fri, 28-Aug-87 01:09:21 EDT References: <9001@brl-adm.ARPA> Reply-To: greg@utcsri.UUCP (Gregory Smith) Organization: CSRI, University of Toronto Lines: 29 Summary: In article <9001@brl-adm.ARPA> wayne@ames.arpa writes: >>>>> #define STRERR() ((errno >=0 && errno < sys_nerr) ? \ >>>>> sys_errlist[errno] : "Unknown error") > >What's wrong with this? Simply that it doesn't tell you what the >unknown value of errno *IS*! When I first saw code like this in >"perror" itself I absolutely could not believe it. Sure it takes a >miniscule amount more work to print "Unknown error 666." But you see, >that's *exactly* what I meant by "UNIX philosophy": it's fine as long >as you don't ever make a mistake, but boy if you ever should, then not >only is UNIX not going to help, it's gonna *HIDE* the one piece of >debugging information it has! > > "The number you reached, which I am not going to tell you > so you won't know whether you misdialed or not and will > have to try again, is not in service." > My favorite is the error message from the MS-DOS 'rmdir' command: 'Invalid path, File not found, or Directory not empty'. As you may have guessed, this is the only error message that rmdir can produce. ' ... or maybe I'm just stupid.' -- ---------------------------------------------------------------------- Greg Smith University of Toronto UUCP: ..utzoo!utcsri!greg Have vAX, will hack...