Make error messages more useful: add a URI
Roland Mainz
rmainz at redhat.com
Tue Oct 7 04:48:01 EDT 2014
----- Original Message -----
> From: "Benjamin Kaduk" <kaduk at mit.edu>
> To: "Roland Mainz" <rmainz at redhat.com>
> Cc: "Nico Williams" <nico at cryptonector.com>, krbdev at mit.edu
> Sent: Monday, October 6, 2014 5:59:22 PM
> Subject: Re: Make error messages more useful: add a URI
>
> Maybe I should let Nico answer for himself, but
>
> On Mon, 6 Oct 2014, Roland Mainz wrote:
>
> >
> >
> > ----- Original Message -----
> > > From: "Nico Williams" <nico at cryptonector.com>
> > > To: "Greg Hudson" <ghudson at mit.edu>
> > > Cc: krbdev at mit.edu
> > > Sent: Thursday, October 2, 2014 11:15:08 PM
> > > Subject: Re: Make error messages more useful: add a URI
> > >
> > >
> > > Roland suggests:
> > >
> > > [libdefaults]
> > >
> > > err_fmt = %E. Please see https://whatever.example/%N
> > >
> > > where %E is whatever the error string would have been and %N is the
> > > error code number (or symbolic name for it).
> > >
> > > The default would be %E.
> > >
> > > Additional contextual information could be provided with other tokens.
> > >
> > > This would allow sites to use URIs or some other non-URI string if they
> > > prefer.
> >
> > BTW: Three nits:
> > 1. Some error messages carry additional information, like an errno message.
> > How can we integrate this ?
>
> I'm pretty sure this is included in the "%E".
>
> > 2. How can we carry over the value of LC_MESSAGES (or better: The result of
> > LANG/LC_MESSAGES/LC_ALL, e.g. $ printf '%s\n'
> > "${LC_ALL:-${LC_MESSAGES:-${LANG:-"C"}}}" # in a POSIX shell) ?
>
> I suspect this is hard to do in a concise manner, so may not end up
> getting done.
1. Why ? AFAIK this isn't hard (see example below)
2. This is then going to backfire in very BAD ways for some scenarios - there are governments like (PRC, Japan, etc.) which mandate correct localisation support. No localisation support - no sales to government.
One option might be to include the result of $ printf '%s\n' "${LC_ALL:-${LC_MESSAGES:-${LANG:-"C"}}}" # (minus encoding, e.g. "en_US.UTF-8" and
"en_US.ISO8859-1" can be reduced to "en_US") into the URL, e.g. file:///usr/share/krb5/docs/en_US/krb_message_8291.html
> > 3. What about intranets with no connection to the outside "world" ?
>
> The proposed file:/// URLs would still work.
OK...
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) rmainz at redhat.com
\__\/\/__/ IPA/Kerberos5 team
/O /==\ O\
(;O/ \/ \O;)
More information about the krbdev
mailing list