TEMP : try to change import of function, create a new PDO exception Handler
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
18d54dd06a
commit
b32202fc32
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace ExceptionHandle;
|
||||||
|
|
||||||
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
use Slim\Exception\HttpSpecializedException;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
|
class PDOError extends HttpSpecializedException {
|
||||||
|
|
||||||
|
protected $code = 408;
|
||||||
|
protected string $title = "PDO connection failed";
|
||||||
|
protected $message = "The connection method throw a PDO Exception, connection to database failed";
|
||||||
|
|
||||||
|
public function __construct(ServerRequestInterface $request,?Throwable $previous = null)
|
||||||
|
{
|
||||||
|
parent::__construct($request, $this->message, $previous);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue