File and line numbers in error messages

Sam Hartman hartmans at MIT.EDU
Wed Apr 29 15:28:15 EDT 2009

The idea of including line numbers in error messages seems like a bad
idea to me.  I don't actually object to it, but grep seems like a
better tool than cluttering up error messages that should be written
for users.  My concern is basically that if an error is likely then it
is more desirable to have the error message be clear than to point to
source code.

However provided that enable-maintainer-mode does not turn on this
behavior, and we don't get more sloppy about writing error messages,
and no one actually ships a build that way, it seems mostly harmless.

Note that krb5_set_error_message is a public API (so it can be used in
plugins) so you don't want to change its calling semantics or turn it
into a macro.  I'd also argue that it would be bad if code built with
this flag had a different ABI in terms of accessor or public exports
than code built without this flag.


More information about the krbdev mailing list