1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 17:46:09 +02:00

Fix unhandled throwable

This commit is contained in:
Avtandil Kikabidze
2018-04-07 04:38:38 +04:00
parent 569cdd635d
commit aad9de4d0d
2 changed files with 4 additions and 2 deletions

View File

@@ -13,12 +13,12 @@ namespace Monolog\Handler;
use Elasticsearch\Client;
use Elasticsearch\Common\Exceptions\RuntimeException as ElasticSearchRuntimeException;
use Exception;
use InvalidArgumentException;
use Monolog\Formatter\ElasticSearchFormatter;
use Monolog\Formatter\FormatterInterface;
use Monolog\Logger;
use RuntimeException;
use Throwable;
/**
* Elastic Search handler
@@ -149,7 +149,7 @@ class ElasticSearchHandler extends AbstractProcessingHandler
if ($responses['errors'] === true) {
throw new ElasticSearchRuntimeException('ElasticSearch returned error for one of the records');
}
} catch (Exception $e) {
} catch (Throwable $e) {
if (! $this->options['ignore_error']) {
throw new RuntimeException('Error sending messages to ElasticSearch', 0, $e);
}