Whoops, the error handler for debugging

Code
<?php

use Whoops\Run;
use 
Whoops\Handler\JsonResponseHandler as Handler;

$whoops = new Run();
// you should see the PrettyPageHandler. it's awesome!
// http://filp.github.io/whoops/screen.png
$whoops->pushHandler(new Handler());
$whoops->register();

// don't directly output on handleException
$whoops->writeToOutput(false);
$whoops->allowQuit(false);

$e = new Exception('Error: no budgies found');

$output $whoops->handleException($e);

echo 
$output;
Result
{"error":{"type":"Exception","message":"Error: no budgies found","code":0,"file":"/whoops.php","line":16}}
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8