Try to make API work again 2
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent c3a75f8573
commit b2c69284c7

@ -21,6 +21,7 @@ class ConnectClass{
function connect(): int|Connection function connect(): int|Connection
{ {
try { try {
echo $this->dsn." ".$this->login." ".$this->password;
$connection = new Connection($this->dsn,$this->login,$this->password); $connection = new Connection($this->dsn,$this->login,$this->password);
}catch (PDOException $e){ }catch (PDOException $e){
throw new PDOException($e->getMessage(), $e->getCode(), $e); throw new PDOException($e->getMessage(), $e->getCode(), $e);

@ -9,12 +9,11 @@ use Throwable;
class PDOError extends HttpSpecializedException { class PDOError extends HttpSpecializedException {
protected $code = 408; protected $code = 408;
protected string $title = "PDO Exception connection failed"; protected string $title = "PDO connection failed";
public function __construct(ServerRequestInterface $request,string $message, ?Throwable $previous = null) public function __construct(ServerRequestInterface $request,string $message,Throwable $previous)
{ {
$this->message = $message; parent::__construct($request,$message,$previous);
parent::__construct($request, $previous);
} }
} }
Loading…
Cancel
Save