Pass proper name resolution error messages in exceptions