diff --git a/sphinx/builders/latex/__init__.py b/sphinx/builders/latex/__init__.py index f48a687f7..7d4d38c42 100644 --- a/sphinx/builders/latex/__init__.py +++ b/sphinx/builders/latex/__init__.py @@ -138,7 +138,7 @@ class LaTeXBuilder(Builder): def get_target_uri(self, docname: str, typ: str = None) -> str: if docname not in self.docnames: - raise NoUri(docname) + raise NoUri(docname, typ) else: return '%' + docname diff --git a/sphinx/builders/manpage.py b/sphinx/builders/manpage.py index 86cc71855..4166dece9 100644 --- a/sphinx/builders/manpage.py +++ b/sphinx/builders/manpage.py @@ -53,7 +53,7 @@ class ManualPageBuilder(Builder): def get_target_uri(self, docname: str, typ: str = None) -> str: if typ == 'token': return '' - raise NoUri(docname) + raise NoUri(docname, typ) @progress_message(__('writing')) def write(self, *ignored: Any) -> None: diff --git a/sphinx/builders/texinfo.py b/sphinx/builders/texinfo.py index 0a09c28ec..5e2e6e240 100644 --- a/sphinx/builders/texinfo.py +++ b/sphinx/builders/texinfo.py @@ -63,7 +63,7 @@ class TexinfoBuilder(Builder): def get_target_uri(self, docname: str, typ: str = None) -> str: if docname not in self.docnames: - raise NoUri(docname) + raise NoUri(docname, typ) else: return '%' + docname