mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Print template path chain in TemplateNotFound exceptions (#11886)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
@@ -63,6 +63,8 @@ Bugs fixed
|
|||||||
Patch by James Addison.
|
Patch by James Addison.
|
||||||
* #11874: Configure a default 30-second value for ``linkcheck_timeout``.
|
* #11874: Configure a default 30-second value for ``linkcheck_timeout``.
|
||||||
Patch by James Addison.
|
Patch by James Addison.
|
||||||
|
* #11886: Print the Jinja2 template path chain in ``TemplateNotFound`` exceptions.
|
||||||
|
Patch by Colin Marquardt.
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
-------
|
-------
|
||||||
|
|||||||
@@ -218,4 +218,5 @@ class BuiltinTemplateLoader(TemplateBridge, BaseLoader):
|
|||||||
return loader.get_source(environment, template)
|
return loader.get_source(environment, template)
|
||||||
except TemplateNotFound:
|
except TemplateNotFound:
|
||||||
pass
|
pass
|
||||||
raise TemplateNotFound(template)
|
msg = f"{template!r} not found in {self.environment.loader.pathchain}"
|
||||||
|
raise TemplateNotFound(msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user