mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 20:56: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)
|
protected function prepareRecord(array &$record)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$indexingConfiguration = $this->configuration->get('indexing.' . $this->identifier . '.dataProcessing');
|
$indexingConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.dataProcessing');
|
||||||
|
|
||||||
if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) {
|
if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) {
|
||||||
foreach ($indexingConfiguration as $configuration) {
|
foreach ($indexingConfiguration as $configuration) {
|
||||||
|
@ -170,7 +170,7 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$indexConfiguration = $this->configuration->get('indexing.' . $this->identifier . '.abstractFields');
|
$indexConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.abstractFields');
|
||||||
|
|
||||||
$fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration);
|
$fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration);
|
||||||
if ($fieldsToUse === []) {
|
if ($fieldsToUse === []) {
|
||||||
|
|
|
@ -68,6 +68,8 @@ class IndexerFactory implements Singleton
|
||||||
// Nothing to do, we throw exception below
|
// Nothing to do, we throw exception below
|
||||||
} catch (MissingArrayPathException $e) {
|
} catch (MissingArrayPathException $e) {
|
||||||
// Nothing to do, we throw exception below
|
// 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);
|
throw new NoMatchingIndexerException('Could not find an indexer for ' . $identifier, 1497341442);
|
||||||
|
|
Loading…
Reference in a new issue