Closed lamuzzachiodi closed 3 years ago
I have also encountered the same issue.
$database = new Medoo([
'database_type' => 'mysql',
'database_name' => $databasename,
'server' => $host,
'username' => $username,
'password' => $password,
]);
Now if the password is incorrect, I expected the $database->error()
to handle the error and give me a message. But instead, I get a Fatal error
. It would be really helpful if all the errors are handled by error()
method.
I'm a newbie user so maybe i can't see something but testing my db connection i've forced an error and i've got an exception. That's good but not "to degrade gracefully". In my humble opinion would be intuitive and less intrusive return a value in the info function for example or maybe in an specific function for check the state connection or something like that.