1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 06:06:40 +02:00

Add support for PHP 7 errors in RavenHandler by checking for Throwable instead of Exception

This commit is contained in:
Jared King
2016-08-17 11:12:48 -05:00
parent f42fbdfd53
commit bc3ccb0e87

View File

@@ -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 {