throw execption if creation/opening of index fails

This commit is contained in:
Uwe Steinmann 2020-09-12 12:49:33 +02:00
parent 41c08492ac
commit 25fc979a3a

View File

@ -31,16 +31,20 @@ class SeedDMS_Lucene_Indexer {
static function open($conf) { /* {{{ */
try {
$index = Zend_Search_Lucene::open($conf['indexdir']);
return($index);
$index = Zend_Search_Lucene::open($conf['indexdir']);
return($index);
} catch (Exception $e) {
return null;
}
} /* }}} */
static function create($conf) { /* {{{ */
$index = Zend_Search_Lucene::create($conf['indexdir']);
return($index);
try {
$index = Zend_Search_Lucene::create($conf['indexdir']);
return($index);
} catch (Exception $e) {
return null;
}
} /* }}} */
/**