Browse Source

remove exception logic from model

PHP-GTK3
yggverse 5 months ago
parent
commit
04eb93cf27
  1. 13
      src/Model/Database.php

13
src/Model/Database.php

@ -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

Loading…
Cancel
Save