On 2/20/12 2:01 PM, foobar wrote:
Seconded. Reflection seems a much better solution for this.

Absolutely.

The i18n table would map (exception type) -> (language, format string)
and the i18n formatter would use reflection to map field values to the
format string.
a format string would be e.g. "File {filename} not found" and the
formatter would replace {filename} with e.class.getField("filename").

This does not require any modifications to the exception mechanism.

Yah, but the reflection engine would have to present RTTI in a uniform manner... such as, Variant[string]. Bane of my life: I'm always right :o).


Andrei

Reply via email to