Update dependencies to latest versions
This commit is contained in:
parent
ba0c78d2ab
commit
c3aa257a2b
4 changed files with 1742 additions and 799 deletions
|
@ -3,6 +3,7 @@
|
|||
namespace Pterodactyl\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
use PDOException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Swift_TransportException;
|
||||
|
@ -72,12 +73,12 @@ class Handler extends ExceptionHandler
|
|||
* services such as AWS Cloudwatch or other monitoring you can replace the
|
||||
* contents of this function with a call to the parent reporter.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @param \Throwable $exception
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
if (! config('app.exceptions.report_all', false) && $this->shouldntReport($exception)) {
|
||||
return null;
|
||||
|
@ -103,7 +104,7 @@ class Handler extends ExceptionHandler
|
|||
return $logger->error($exception);
|
||||
}
|
||||
|
||||
private function generateCleanedExceptionStack(Exception $exception)
|
||||
private function generateCleanedExceptionStack(Throwable $exception)
|
||||
{
|
||||
$cleanedStack = '';
|
||||
foreach ($exception->getTrace() as $index => $item) {
|
||||
|
@ -133,12 +134,12 @@ class Handler extends ExceptionHandler
|
|||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $exception
|
||||
* @param \Throwable $exception
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
$connections = Container::getInstance()->make(Connection::class);
|
||||
|
||||
|
@ -200,11 +201,11 @@ class Handler extends ExceptionHandler
|
|||
/**
|
||||
* Return the exception as a JSONAPI representation for use on API requests.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @param \Throwable $exception
|
||||
* @param array $override
|
||||
* @return array
|
||||
*/
|
||||
public static function convertToArray(Exception $exception, array $override = []): array
|
||||
public static function convertToArray(Throwable $exception, array $override = []): array
|
||||
{
|
||||
$error = [
|
||||
'code' => class_basename($exception),
|
||||
|
@ -259,10 +260,10 @@ class Handler extends ExceptionHandler
|
|||
* Converts an exception into an array to render in the response. Overrides
|
||||
* Laravel's built-in converter to output as a JSONAPI spec compliant object.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @param \Throwable $exception
|
||||
* @return array
|
||||
*/
|
||||
protected function convertExceptionToArray(Exception $exception)
|
||||
protected function convertExceptionToArray(Throwable $exception)
|
||||
{
|
||||
return self::convertToArray($exception);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue