
Jeffrey Lee Hellrung, Jr. wrote:
I'm having trouble parsing this (which error handlers? those in boost::locale::format?), but it sounds like you accept that there may be scenarios under which a syntax error should throw an exception...
No, I don't. As a practical matter, such scenarios occur approximately never. This can be used as an interview question if the candidate lists localization experience - it's a good trap. Consider for example a dialog box with 12 localizable texts. It makes no sense to abort its creation if the formatting or localization of the second text fails, and neither does it make sense to leave the rest of the texts blank or untranslated/unformatted. In practice, if these functions throw, you'll have to wrap each and every call with a try block, which is an obvious indication that these functions shouldn't throw.