remove exception logic from model

This commit is contained in:
yggverse 2024-06-27 17:25:06 +03:00
parent 84cc4899d7
commit 04eb93cf27

View file

@ -13,8 +13,6 @@ class Database
?string $username = null, ?string $username = null,
?string $password = null ?string $password = null
) { ) {
try
{
$this->_database = new \PDO( $this->_database = new \PDO(
sprintf( sprintf(
'sqlite:%s', 'sqlite:%s',
@ -45,17 +43,6 @@ class Database
'); ');
} }
catch (\PDOException $exception)
{
exit(
print_r(
$exception->getMessage(),
true
)
);
}
}
public function addHistory( public function addHistory(
string $url, string $url,
?string $title = null ?string $title = null