This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to format an error?


> Date: Sat, 02 Feb 2002 11:09:15 -0500
>> From: Andrew Cagney <ac131313@cygnus.com>
>> 
>> Wouldn't the gettext stuff let the german translator do this?
> 
> 
> gettext? what gettext? there _is_ no gettext in GDB ;-)


> Anyway, the specific case I cited was with system error messages
> returned by strerror.  These are not subject to translations.


My manual says:

     The strerror() function returns a pointer to the language-dependent error
     message string affiliated with an error number.


with a SEE ALSO to setlocale().  I guess something like:

   error ("Cannot perform exponentiation: %s", strerror (errno));

is ok, but:

   error ("%s on target_read", safe_strerror (err));

is really bad.

Andrew

(Hmm, I like the swapping between strerror and save_strerror ...)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]