mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +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) { /* {{{ */
|
||||
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;
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user