mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
put opening of index into try/catch for better handling of missing index
This commit is contained in:
parent
d5b629769b
commit
7d898a7efc
|
@ -30,8 +30,12 @@ class LetoDMS_Lucene_Indexer {
|
||||||
protected $indexname;
|
protected $indexname;
|
||||||
|
|
||||||
function open($luceneDir) { /* {{{ */
|
function open($luceneDir) { /* {{{ */
|
||||||
|
try {
|
||||||
$index = Zend_Search_Lucene::open($luceneDir);
|
$index = Zend_Search_Lucene::open($luceneDir);
|
||||||
return($index);
|
return($index);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function create($luceneDir) { /* {{{ */
|
function create($luceneDir) { /* {{{ */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user