Subject: Re: err(3) and error handling
To: None <firstname.lastname@example.org>
From: VaX#n8 <email@example.com>
Date: 02/04/1995 23:25:58
While really really bored, firstname.lastname@example.org wrote:
> What would you rather it print?
> 1) I don't know how to mount that. (Isn't that what it just said?)
Yeah, it's saying that, more or less, if you know how to read the source
to the command, and can figure out which system call is generating the
error. And which program is doing the erroring.
> 2) M781Z892Y892 - Invalid DOS partition table. (How is it supposed to
> 3) mount_msdos: /dev/zd0a: Invalid argument. This may not be a valid
No need to get sarcastic, how about "Not a DOS file system"? Isn't that
really what it means?
His reaction to the invalid argument message was what I'd expect from
a newbie; "Argument to what?" - then "Which argument?" (he was invoking
mount, not mount_msdos, so it was even less clear with 6-7 parameters).
And he was pretty computer-competent.
It's really referring to a function in the program, not to the program at all.
If you don't find this confusing, maybe it's not an issue for you - I was
more interested in what the right way to handle something like that was,
rather than getting this Particular obscurity fixed. I conjectured about
some of the ways to make it better, perhaps there are a few I missed?
Seems like some of the error messages are trying to do too much duty, and
pay a little price of vagueness. Isn't it reasonable to ponder how you might
better match error codes with specific messages for a particular context?
VaX#n8 (vak-sa-nate) - n, CS senior++ and Unix junkie - email@example.com
Information Freedom Fighter - PGP key on request