summaryrefslogtreecommitdiffstats
path: root/src/Monolog/Handler/PHPConsoleHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Monolog/Handler/PHPConsoleHandler.php')
-rw-r--r--src/Monolog/Handler/PHPConsoleHandler.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Monolog/Handler/PHPConsoleHandler.php b/src/Monolog/Handler/PHPConsoleHandler.php
index 511bf4e..0bc16ee 100644
--- a/src/Monolog/Handler/PHPConsoleHandler.php
+++ b/src/Monolog/Handler/PHPConsoleHandler.php
@@ -11,7 +11,6 @@
namespace Monolog\Handler;
-use Exception;
use Monolog\Formatter\LineFormatter;
use Monolog\Formatter\FormatterInterface;
use Monolog\Logger;
@@ -71,12 +70,12 @@ class PHPConsoleHandler extends AbstractProcessingHandler
* @param Connector|null $connector Instance of \PhpConsole\Connector class (optional)
* @param int $level
* @param bool $bubble
- * @throws Exception
+ * @throws RuntimeException
*/
public function __construct(array $options = [], Connector $connector = null, $level = Logger::DEBUG, $bubble = true)
{
if (!class_exists('PhpConsole\Connector')) {
- throw new Exception('PHP Console library not found. See https://github.com/barbushin/php-console#installation');
+ throw new \RuntimeException('PHP Console library not found. See https://github.com/barbushin/php-console#installation');
}
parent::__construct($level, $bubble);
$this->options = $this->initOptions($options);
@@ -87,7 +86,7 @@ class PHPConsoleHandler extends AbstractProcessingHandler
{
$wrongOptions = array_diff(array_keys($options), array_keys($this->options));
if ($wrongOptions) {
- throw new Exception('Unknown options: ' . implode(', ', $wrongOptions));
+ throw new \RuntimeException('Unknown options: ' . implode(', ', $wrongOptions));
}
return array_replace($this->options, $options);
@@ -177,7 +176,7 @@ class PHPConsoleHandler extends AbstractProcessingHandler
{
if ($record['level'] < Logger::NOTICE) {
$this->handleDebugRecord($record);
- } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) {
+ } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
$this->handleExceptionRecord($record);
} else {
$this->handleErrorRecord($record);