Smarter error handling in Dojo i18n script