logger->error(sprintf('%s[%s] in %s', $throwable->getMessage(), $throwable->getLine(), $throwable->getFile())); $this->logger->error($throwable->getTraceAsString()); return $response->withHeader('Server', 'leapy')->withStatus(500)->withBody(new SwooleStream(json_encode(['code'=>2,'msg'=>"服务器内部错误"]))); } public function isValid(Throwable $throwable): bool { return true; } }