No, there is no list of exception messages, and I don't think there is one in the Python language documentation.
Can you be more precise about NameError not "returning" a line number ? Is is in the error trace or in the attributes of the exception object or somewhere else ?
- Pierre