2021-08-04 15:17:25 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Server;
|
|
|
|
|
|
|
|
|
|
use Server\Constrict\Response;
|
2021-08-04 15:39:06 +08:00
|
|
|
use Throwable;
|
2021-09-10 10:53:54 +08:00
|
|
|
use Server\Constrict\ResponseInterface;
|
2021-08-04 15:17:25 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
interface ExceptionHandlerInterface
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-08-04 15:39:06 +08:00
|
|
|
* @param Throwable $exception
|
2021-08-04 15:17:25 +08:00
|
|
|
* @param Response $response
|
2021-08-05 00:57:45 +08:00
|
|
|
* @return ResponseInterface
|
2021-08-04 15:17:25 +08:00
|
|
|
*/
|
2021-08-05 00:57:45 +08:00
|
|
|
public function emit(Throwable $exception, Response $response): ResponseInterface;
|
2021-08-04 15:17:25 +08:00
|
|
|
|
|
|
|
|
}
|