error info handling in MIT krb5 code
Ken Raeburn
raeburn at MIT.EDU
Mon Mar 27 11:33:22 EST 2006
On Mar 25, 2006, at 13:09, Sam Hartman wrote:
> I'd recommend against use of macros to capture line and file
> especially for a semi-public interface.
Okay.
> I'm concerned about having complex formatting in the error handling
> interfaces. I'm concerned that it may make translation of strings
> harder particularly for Apple and Windows. I don't know what the
> solution is here.
Well, we at least need some subset of printf-style formatting.
Rolling our own would be more work in the short term; I doubt it
would make the translation significantly harder for other platforms,
at least not if we want to use common source translation tables
across platforms for the common libraries, but it may be a bit
harder, yes. Let's try printf for now, and see...
I've implemented a first cut in the trunk now. I've made a couple of
changes from what I sent out: (1) I added "_message" to the end of
symbol names, since "krb5_free_error" was already taken. (2) The
routines should now all accept a null pointer for the krb5_context,
in which case error_message is called for retrieving strings and
supplied messages are ignored; this makes writing certain approaches
to the application code (one error-printing routine, "if I have a
Kerberos context, do this new thing, otherwise use error_message")
simpler.
Ken
More information about the krbdev
mailing list