Improve error message "could not find driver"
Opened this issue · 2 comments
In a fresh installation, I just got the error could not find driver
displayed in the panel.
It took me quite some research to find out this was PDO drivers which were missing on that particular system (something which can be seen when inspecting a phpinfo()
).
Probably this is not even a problem of this plugin but kirby in general, however the error message should probably give more context (such as: could not find a PDO driver
). In particular, this plugin requires the sqlite PDO driver.
This error message directly comes from PHP, so it's not one that Retour or even Kirby can improve itself. If anyone has an idea where/how to catch that message and throw our own one, happy to give that a try.
A good error display would include the Kirby Panel Header/Design/Logo/etc, a description such as "could not process this page", a stack trace. This message looks like as a call to die("could not find driver")
which is not helpful at all. As I said, even including the three letters PDO in front of the word driver would improve.
Is there a logging or error reporting framework used in the Panel? Once I worked with (Python) flask, it had a really beautiful error display https://flask.palletsprojects.com/en/stable/debugging/ and I remember that I have seen similar things with PHP Symfony once.