doc/search: do not break on "ill-formed" docs

We got ugly exceptions for non-obvious errors such as missing titles
This commit is contained in:
Thomas Gelf 2015-03-13 08:56:37 +01:00
parent 6bf8849d98
commit 697d4aff27

View File

@ -36,15 +36,15 @@ class Doc_SearchController extends DocController
if (($path = $this->getModulePath($module)) !== null) { if (($path = $this->getModulePath($module)) !== null) {
try { try {
$parser = new DocParser($path); $parser = new DocParser($path);
$search = new DocSearchRenderer(
new DocSearchIterator(
$parser->getDocTree()->getIterator(),
new DocSearch($this->params->get('q'))
)
);
} catch (DocException $e) { } catch (DocException $e) {
continue; continue;
} }
$search = new DocSearchRenderer(
new DocSearchIterator(
$parser->getDocTree()->getIterator(),
new DocSearch($this->params->get('q'))
)
);
$search $search
->setUrl('doc/module/chapter') ->setUrl('doc/module/chapter')
->setUrlParams(array('moduleName' => $module)); ->setUrlParams(array('moduleName' => $module));