Generate localized exception message before serializing the exception