Catch and log all listener exceptions
This commit is contained in:
parent
73aff18870
commit
e10d466215
|
@ -15,7 +15,7 @@ class Listener extends AbstractListener implements EventSubscriber
|
|||
if ($document instanceof $this->objectClass) {
|
||||
try {
|
||||
$this->objectPersister->insertOne($document);
|
||||
} catch (\Elastica_Exception_Abstract $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->logFailure($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class Listener extends AbstractListener implements EventSubscriber
|
|||
if ($document instanceof $this->objectClass) {
|
||||
try {
|
||||
$this->objectPersister->replaceOne($document);
|
||||
} catch (\Elastica_Exception_Abstract $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->logFailure($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class Listener extends AbstractListener implements EventSubscriber
|
|||
if ($document instanceof $this->objectClass) {
|
||||
try {
|
||||
$this->objectPersister->deleteOne($document);
|
||||
} catch (\Elastica_Exception_Abstract $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->logFailure($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class Listener extends AbstractListener implements EventSubscriber
|
|||
if ($entity instanceof $this->objectClass) {
|
||||
try {
|
||||
$this->objectPersister->insertOne($entity);
|
||||
} catch (\Elastica_Exception_Abstract $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->logFailure($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class Listener extends AbstractListener implements EventSubscriber
|
|||
if ($entity instanceof $this->objectClass) {
|
||||
try {
|
||||
$this->objectPersister->replaceOne($entity);
|
||||
} catch (\Elastica_Exception_Abstract $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->logFailure($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class Listener extends AbstractListener implements EventSubscriber
|
|||
if ($entity instanceof $this->objectClass) {
|
||||
try {
|
||||
$this->objectPersister->deleteOne($entity);
|
||||
} catch (\Elastica_Exception_Abstract $e) {
|
||||
} catch (\Exception $e) {
|
||||
$this->logFailure($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue