mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
throw execption if creation/opening of index fails
This commit is contained in:
parent
41c08492ac
commit
25fc979a3a
|
@ -31,16 +31,20 @@ class SeedDMS_Lucene_Indexer {
|
||||||
|
|
||||||
static function open($conf) { /* {{{ */
|
static function open($conf) { /* {{{ */
|
||||||
try {
|
try {
|
||||||
$index = Zend_Search_Lucene::open($conf['indexdir']);
|
$index = Zend_Search_Lucene::open($conf['indexdir']);
|
||||||
return($index);
|
return($index);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
static function create($conf) { /* {{{ */
|
static function create($conf) { /* {{{ */
|
||||||
$index = Zend_Search_Lucene::create($conf['indexdir']);
|
try {
|
||||||
return($index);
|
$index = Zend_Search_Lucene::create($conf['indexdir']);
|
||||||
|
return($index);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user