From bc3ccb0e874704891ef059dcf61aa0d2a5225874 Mon Sep 17 00:00:00 2001 From: Jared King Date: Wed, 17 Aug 2016 11:12:48 -0500 Subject: [PATCH] Add support for PHP 7 errors in RavenHandler by checking for Throwable instead of Exception --- src/Monolog/Handler/RavenHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monolog/Handler/RavenHandler.php b/src/Monolog/Handler/RavenHandler.php index 90758274..0b9f3679 100644 --- a/src/Monolog/Handler/RavenHandler.php +++ b/src/Monolog/Handler/RavenHandler.php @@ -179,7 +179,7 @@ class RavenHandler extends AbstractProcessingHandler $options['release'] = $this->release; } - if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) { + if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { $options['extra']['message'] = $record['formatted']; $this->ravenClient->captureException($record['context']['exception'], $options); } else {