这是官方的代码
<?php
namespace App;
use Max\VarDumper\Dumper;
use Max\VarDumper\DumperHandler;
use support\exception\Handler;
use Throwable;
use Webman\Http\Request;
use Webman\Http\Response;
class ExceptionHandler extends Handler
{
use AbortHandler;
public function render(Request $request, Throwable $exception): Response
{
if ($exception instanceof Dumper) {
return \response(self::convertToHtml($exception));
}
return parent::render($request, $exception);
}
}
但是我在use AbortHandler时,找不到AbortHandler,有遇到过的吗
AbortHandler没有引入
已解决,项目里面压根就没有AbortHandler,换成DumperHandler就可以了 ,github里面用的就是DumperHandler