异常啊异常

This commit is contained in:
Aether
2025-09-26 17:27:15 +08:00
parent d7880f99c9
commit afd384a52a
2 changed files with 6 additions and 5 deletions

View File

@@ -7,8 +7,6 @@ namespace Aether;
use Hyperf\Context\Context;
use Hyperf\ExceptionHandler\ExceptionHandler;
use Hyperf\HttpMessage\Stream\SwooleStream;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
use Throwable;
@@ -16,10 +14,9 @@ use function Hyperf\Support\env;
class RpcExceptionHandler extends ExceptionHandler
{
/**
*/
public function handle(Throwable $throwable, ResponseInterface $response): ResponseInterface
{var_dump($throwable->getMessage());
{
var_dump($throwable->getMessage());
try {
// 获取请求ID用于日志追踪
$requestId = Context::get('request_id', '');