[task] catch wrong exceptions when accessing configuration

This commit is contained in:
Daniel Maier 2018-10-30 11:46:21 +01:00
parent d1607ac1b4
commit fbaa555b96
2 changed files with 4 additions and 2 deletions

View file

@ -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 === []) {

View file

@ -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);