catch and raise NameError exception