[242] in Kerberos

home help back first fref pref prev next nref lref last post

Re: reporting of errors.

daemon@TELECOM.MIT.EDU (steiner@ATHENA.MIT.EDU)
Fri Oct 30 10:26:43 1987

From: steiner@ATHENA.MIT.EDU
To: Bill Sommerfeld <wesommer@ATHENA.MIT.EDU>
Cc: kerberos@ATHENA.MIT.EDU
In-Reply-To: Your message of Thu, 29 Oct 87 15:58:48 -0500.


> Global variables shared between libraries and applications are
> inherently _evil_, since they clutter up the namespace.  In addition,
> there are insufficient constraints on when errno can and cannot be
> clobbered.  Instead, use of Ken's com_err package (which is already in
> use by SMS, as well as being in use inside discuss and a few other
> places) seems to make a lot of sense.

I agree com_err is nice.  It integrates lists of error codes and texts,
such as Unix system errors and Kerberos library errors, and it provides
a uniform way of printing them.

But com_err by itself doesn't enforce any policy as far as I know (and
it probably shouldn't).  The error code you pass to it can be "errno",
the return value of a function, your mother's middle initial, or whatever.

What I'm wondering about are things like, should library functions print
error messages, if so, in what cases; or should they only pass on any
errors they get, if so, how; is there any time when they should abort
a program, etc.?

Jennifer

home help back first fref pref prev next nref lref last post