itsgoingd / clockwork

Clockwork - php dev tools in your browser - server-side component
https://underground.works/clockwork
MIT License
5.7k stars 320 forks source link

Support PHP \Throwable #565

Closed EdmondDantes closed 2 years ago

EdmondDantes commented 2 years ago

https://github.com/itsgoingd/clockwork/blob/6a7b3942224fa53cf3704d9adba636e1f3dfeb9a/Clockwork/Request/Log.php#L121

\Throwable is the base exception class in PHP. Errors of this class are not displayed correctly

return ! empty($context['exception']) && $context['exception'] instanceof \Throwable && empty($context['raw']);

mahagr commented 2 years ago

It'll work even in PHP 5.6 even if it doesn't have the Throwable class. But for PHP 5.6 you need to add the \Exception, too.

itsgoingd commented 2 years ago

Added in master (https://github.com/itsgoingd/clockwork/commit/fdc2b3164666e342e9e15d2667cfc46fed095461), thanks. Will tag a new release later this week.