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:
parent
6bf8849d98
commit
697d4aff27
|
@ -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);
|
||||||
} catch (DocException $e) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$search = new DocSearchRenderer(
|
$search = new DocSearchRenderer(
|
||||||
new DocSearchIterator(
|
new DocSearchIterator(
|
||||||
$parser->getDocTree()->getIterator(),
|
$parser->getDocTree()->getIterator(),
|
||||||
new DocSearch($this->params->get('q'))
|
new DocSearch($this->params->get('q'))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
} catch (DocException $e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$search
|
$search
|
||||||
->setUrl('doc/module/chapter')
|
->setUrl('doc/module/chapter')
|
||||||
->setUrlParams(array('moduleName' => $module));
|
->setUrlParams(array('moduleName' => $module));
|
||||||
|
|
Loading…
Reference in New Issue