'Present a string representation which includes a template traceback, so
we can tell where this error occurred in the template, as well as in
Python.'

def __repr__(self):

    from traceback import format_list
    if self._roots:
        roots = (('        ' + '\n        '.join([self._formatRoot(r) for r in self._roots])) + '\n')
    else:
        roots = ''
    if self._traceback:
        traceback = ('\n'.join([line for entry in format_list(self._traceback) for line in entry.splitlines()]) + '\n')
    else:
        traceback = ''
    return (((((('Exception    while    flattening:\n' + roots) + traceback) + self._exception.__class__.__name__) + ':    ') + str(self._exception)) + '\n')
