error info handling in MIT krb5 code

Ken Hornstein kenh at cmf.nrl.navy.mil
Fri Mar 17 14:13:29 EST 2006


>Q: Custom or *printf formatting?

I personally would prefer *printf formatting.

>Q: Should there be a get_error version that doesn't require having the
>correct numeric error code?  Or maybe a magic value (maybe 0 or -1)
>which matches any saved code?

I can't think of an reason to use that.

>Q: How about a "peek" function that doesn't reset the state?

Maybe.

>Q: Should we save file name and line number?  Function name?  The
>above interfaces could be macros that wrap calls to functions taking
>the extra arguments.  They might help in debugging, but currently
>there's no way to retrieve the information.  (Perhaps an environment
>variable could cause krb5_set_error to include them in the generated
>string.  In a locale-dependent form, of course.)

I'm curious ... how would this look in application code?  Are
applications intended to call com_err which will use
krb5_get_error_string(), or are applications supposed to call
krb5_get_error_string() directly?

--Ken



More information about the krbdev mailing list