svenfuchs/i18n — pull request #193 by nashbridges (2013-03-21 23:35:16+00:00)
Title: Custom handler for MissingInterpolationArgument exception

On a recent project we've moved all translations to a database and provided UI for a customer. While this is a great relief for us, we're not in control of translations anymore. This means that customer can make a typo in an interpolation argument, and this *should not* blow up whole rendering.

Moreover, we should be consistent in a way that we handle missing items. On the one hand, we're placing "missing translation" hints, but on the other hand, we're raising an exception.

Provided solution is completely backward compatible, i.e. exceptions are raised like before. It allows to replace exception handler and return custom hint instead though. Still, I propose to stop raising exceptions on a next major release.