diff --git a/Source/API/script/Config/ConnectClass.php b/Source/API/script/Config/ConnectClass.php index 440d095..feaa2b9 100644 --- a/Source/API/script/Config/ConnectClass.php +++ b/Source/API/script/Config/ConnectClass.php @@ -21,6 +21,7 @@ class ConnectClass{ function connect(): int|Connection { try { + echo $this->dsn." ".$this->login." ".$this->password; $connection = new Connection($this->dsn,$this->login,$this->password); }catch (PDOException $e){ throw new PDOException($e->getMessage(), $e->getCode(), $e); diff --git a/Source/API/script/ExceptionHandle/PDOError.php b/Source/API/script/ExceptionHandle/PDOError.php index 4421ac4..09362ba 100644 --- a/Source/API/script/ExceptionHandle/PDOError.php +++ b/Source/API/script/ExceptionHandle/PDOError.php @@ -9,12 +9,11 @@ use Throwable; class PDOError extends HttpSpecializedException { 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, $previous); + parent::__construct($request,$message,$previous); } } \ No newline at end of file