      def __init__(self, msg, tried=None, backend=None, chain=None):
          self.backend = backend
          self.tried = tried or []
          super(TemplateDoesNotExist, self).__init__(msg)
  
  
  class TemplateEncodingError(Exception):
 
</s> remove     def __init__(self, msg, tried=None):
 </s> add     def __init__(self, msg, tried=None, backend=None, chain=None):
        self.backend = backend </s> remove     This exception is used when template loaders are unable to find a
    template. The tried argument is an optional list of tuples containing
    (origin, status), where origin is an Origin object and status is a string
    with the reason the template wasn't found.
 </s> add     The exception used by backends when a template does not exist. Accepts the
    following optional arguments:

    backend
        The template backend class used when raising this exception.

    tried
        A list of sources that were tried when finding the template. This
        is formatted as a list of tuples containing (origin, status), where
        origin is an Origin object and status is a string with the reason the
        template wasn't found.

    chain
        A list of intermediate TemplateDoesNotExist exceptions. This is used to
        encapsulate multiple exceptions when loading templates from multiple
        engines. </s> remove             postmortem = []

            # TODO: add support for multiple template engines (#24120).
            # TemplateDoesNotExist should carry all the information, including
            # the backend, rather than looping through engines.all.
            for engine in engines.all():
                if hasattr(engine, 'engine'):
                    e = engine.engine
                else:
                    e = engine

                postmortem.append(dict(
                    engine=engine,
                    tried=[
                        entry for entry in self.exc_value.tried if
                        entry[0].loader.engine == e
                    ],
                ))
            self.postmortem = postmortem
 </s> add             self.postmortem = self.exc_value.chain or [self.exc_value] </s> remove     tried = []
 </s> add     chain = []
        self.chain = chain or []
      def __init__(self, msg, tried=None, backend=None, chain=None):
          self.backend = backend
          self.tried = tried or []
        self.chain = chain or []
          super(TemplateDoesNotExist, self).__init__(msg)
  
  
  class TemplateEncodingError(Exception):
keep keep add keep keep keep keep
 Fixed #24119, #24120 -- Formalized debug integration for template backends. 
django/template/base.py