'This helps people debug their templates.
If a variable isn\'t defined, then some context is shown in the traceback.
TODO: Attach context for other errors.'

def __str__(self):

    if hasattr(self, 'near'):
        return ('%s\n\nNear:    %s' % (self.args[0], pprint.pformat(self.near)))
    else:
        return self.args[0]
