Change the name of ArrayBoundsException in druntime

Sergey Gromov snake.scaly at gmail.com
Thu Oct 23 15:45:36 PDT 2008


Fri, 24 Oct 2008 06:55:27 +0900,
Bill Baxter wrote:
> On Fri, Oct 24, 2008 at 6:41 AM, Sergey Gromov <snake.scaly at gmail.com> wrote:
> > Thu, 23 Oct 2008 14:44:46 -0500,
> > Andrei Alexandrescu wrote:
> >> Sorry, I meant to catch Exception. My point was, if I want to print an
> >> informative message, the exception should be able to provide it without
> >> having to encode it in its type.
> >
> > It's all nice and simple until you want to localize.  Then all your
> > 'informative compiler-provided messages' appear as garbage to a non-
> > English-speaking user.  They need to be translated somehow.  And the
> > translation is likely to be based upon the context, not upon an arbitrary
> > string exception contains.
> 
> Just use poedit or whatever to provide localizations of the messages.
> I don't see how this has bearing on the discussion at all.

Where do I get all the messages library may throw?  How can I be sure 
that the message won't change in the next release, silently discarding my 
translation?

Informative library-provided messages are a myth.  The only informative 
part is an exception type, or a standardized error code--which is even 
better for localization.  The "writeln(e.toString())" approach only 
suffices for quick utilities not meant for use by an end user.



More information about the Digitalmars-d mailing list