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:
parent
80d5396f9d
commit
9c59a6ea84
@ -63,6 +63,8 @@ Bugs fixed
|
||||
Patch by James Addison.
|
||||
* #11874: Configure a default 30-second value for ``linkcheck_timeout``.
|
||||
Patch by James Addison.
|
||||
* #11886: Print the Jinja2 template path chain in ``TemplateNotFound`` exceptions.
|
||||
Patch by Colin Marquardt.
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
@ -218,4 +218,5 @@ class BuiltinTemplateLoader(TemplateBridge, BaseLoader):
|
||||
return loader.get_source(environment, template)
|
||||
except TemplateNotFound:
|
||||
pass
|
||||
raise TemplateNotFound(template)
|
||||
msg = f"{template!r} not found in {self.environment.loader.pathchain}"
|
||||
raise TemplateNotFound(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user