..
This commit is contained in:
@@ -1,20 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
/**
|
|
||||||
* This file is part of Hyperf.
|
|
||||||
*
|
|
||||||
* @link https://www.hyperf.io
|
|
||||||
* @document https://hyperf.wiki
|
|
||||||
* @contact group@hyperf.io
|
|
||||||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Exception\Handler;
|
namespace App\Exception\Handler;
|
||||||
|
|
||||||
use Hyperf\Contract\StdoutLoggerInterface;
|
use Hyperf\Contract\StdoutLoggerInterface;
|
||||||
use Hyperf\ExceptionHandler\ExceptionHandler;
|
use Hyperf\ExceptionHandler\ExceptionHandler;
|
||||||
use Hyperf\HttpMessage\Stream\SwooleStream;
|
use Hyperf\HttpMessage\Stream\SwooleStream;
|
||||||
|
use Psr\Http\Message\MessageInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
@@ -24,7 +17,7 @@ class AppExceptionHandler extends ExceptionHandler
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle(Throwable $throwable, ResponseInterface $response)
|
public function handle(Throwable $throwable, ResponseInterface $response): MessageInterface|ResponseInterface
|
||||||
{
|
{
|
||||||
$this->logger->error(sprintf('%s[%s] in %s', $throwable->getMessage(), $throwable->getLine(), $throwable->getFile()));
|
$this->logger->error(sprintf('%s[%s] in %s', $throwable->getMessage(), $throwable->getLine(), $throwable->getFile()));
|
||||||
$this->logger->error($throwable->getTraceAsString());
|
$this->logger->error($throwable->getTraceAsString());
|
||||||
|
|||||||
Reference in New Issue
Block a user