http://docs.makotemplates.org/en/latest/usage.html#handling-exceptions explains how to get better error reports. Also reporting the module and variable that was used as template will help to identify the actual source position.
Set Template(uri=...) for templates from module variables in order to improve the usefulness of the error reports. See http://docs.makotemplates.org/en/latest/usage.html#api-reference