Make warning message consistent; re-read toctree document when include is missing.

This commit is contained in:
Georg Brandl 2011-01-07 16:42:18 +01:00
parent 210add8d2c
commit 8e43f4f603

View File

@ -73,8 +73,9 @@ class TocTree(Directive):
entries.append((title, ref))
elif docname not in env.found_docs:
ret.append(self.state.document.reporter.warning(
'toctree references unknown document %r' % docname,
line=self.lineno))
'toctree contains reference to nonexisting '
'document %r' % docname, line=self.lineno))
env.note_reread()
else:
entries.append((title, docname))
includefiles.append(docname)