mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 04:37:38 +02:00
Merge pull request #834 from jaredtking/raven-php7-throwable
Add support for PHP 7 errors in RavenHandler
This commit is contained in:
@@ -179,7 +179,7 @@ class RavenHandler extends AbstractProcessingHandler
|
|||||||
$options['release'] = $this->release;
|
$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'];
|
$options['extra']['message'] = $record['formatted'];
|
||||||
$this->ravenClient->captureException($record['context']['exception'], $options);
|
$this->ravenClient->captureException($record['context']['exception'], $options);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user