Boost logo

Boost :

Subject: Re: [boost] [locale] Formal review of Boost.Locale library startstomorrow
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-04-17 09:31:16

Jeff wrote:

> > Okay, I can buy that in some circumstances, you want syntax errors to be
> > silently ignored.

No. You are looking at the problem from a programmer perspective, but when
these errors are introduced, there is no programmer present. As a matter of
fact, the programmers may already have been fired. The person who is
translating the text is introducing the errors, and he is the one who needs
to be able to see them and fix them. The best way to do that is for the
translate/format functions to return a string from which one can deduce that
a syntax error has occurred, so that the translator (or the user) can see
the error appearing instead of the properly translated text - without this
interfering with the user's ability to continue using the software as would
happen if an exception aborted the entire, potentially time consuming,
operation. This does not "silently ignore" the errors, it reports them in an
appropriate way, to the appropriate person.

Now, you could make the case that you, as a programmer, should still have
the error reported to you by the library so that you can log it (if the
library doesn't have built-in logging support), which of course would also
allow you to promptly proceed to ignore everything that's been said and make
the error handlers throw exceptions. :-)

Boost list run by bdawes at, gregod at, cpdaniel at, john at