mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 16:16:12 +01:00
[task] catch wrong exceptions when accessing configuration
This commit is contained in:
parent
d1607ac1b4
commit
fbaa555b96
2 changed files with 4 additions and 2 deletions
|
@ -137,7 +137,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
protected function prepareRecord(array &$record)
|
||||
{
|
||||
try {
|
||||
$indexingConfiguration = $this->configuration->get('indexing.' . $this->identifier . '.dataProcessing');
|
||||
$indexingConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.dataProcessing');
|
||||
|
||||
if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) {
|
||||
foreach ($indexingConfiguration as $configuration) {
|
||||
|
@ -170,7 +170,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
|||
|
||||
try {
|
||||
|
||||
$indexConfiguration = $this->configuration->get('indexing.' . $this->identifier . '.abstractFields');
|
||||
$indexConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.abstractFields');
|
||||
|
||||
$fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration);
|
||||
if ($fieldsToUse === []) {
|
||||
|
|
|
@ -68,6 +68,8 @@ class IndexerFactory implements Singleton
|
|||
// Nothing to do, we throw exception below
|
||||
} catch (MissingArrayPathException $e) {
|
||||
// Nothing to do, we throw exception below
|
||||
} catch (\RuntimeException $exception) {
|
||||
// Nothing to do, we throw exception below
|
||||
}
|
||||
|
||||
throw new NoMatchingIndexerException('Could not find an indexer for ' . $identifier, 1497341442);
|
||||
|
|
Loading…
Reference in a new issue