This commit is contained in:
xl
2023-11-22 17:07:11 +08:00
parent 01f920c8d8
commit 882062a403
+2 -3
View File
@@ -63,18 +63,17 @@ class OnRequest implements OnRequestInterface
/** /**
* @param ResponseInterface $response * @param ResponseInterface $response
* @param RequestInterface $request
* @param ContainerInterface $container * @param ContainerInterface $container
* @param DataGrip $dataGrip * @param DataGrip $dataGrip
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
* @throws ReflectionException * @throws ReflectionException
*/ */
public function __construct(public ResponseInterface $response, public RequestInterface $request, public ContainerInterface $container, public function __construct(public ResponseInterface $response, public ContainerInterface $container,
public DataGrip $dataGrip) public DataGrip $dataGrip)
{ {
$this->responseEmitter = $this->response->emmit; $this->responseEmitter = $this->response->emmit;
$exception = $this->request->exception; $exception = \config('components.request.exception');
if (!in_array(ExceptionHandlerInterface::class, class_implements($exception))) { if (!in_array(ExceptionHandlerInterface::class, class_implements($exception))) {
$exception = ExceptionHandlerDispatcher::class; $exception = ExceptionHandlerDispatcher::class;
} }