-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print more detailed ("extended") error code in SQLite3 code #1479
Conversation
Awaiting testing feedback from @rdwebdesign |
d2adf1c
to
f3071e8
Compare
Before:
Using the new branch:
Note: |
So the new information here is only |
This PR had the intention to be useful when debugging a "I/O error" which been have a lot of reasons. I'll try to provide an example myself later. |
Okay, what I did here was the following: Removed
When starting FTL on
which is kind of confusing as the database file itself has the correct permissions. However, SQLite3 means the entirety of the database here (including the transient journal file) which is confusing if you are not aware of this. On the new branch we get the slightly more detailed message:
The extended error code at the very end gives us a better picture of what to look out for during debugging. Other examples where this might turn out to be useful are the mentioned very general "disk I/O error" which can have the following error codes underneath:
Some other examples for the rather generic
I will stop here and assume you might be convinced. |
Thanks. This is really useful. As the corresponding strings are manually copied from |
…e helpful in a lot of cases where we'd only be logging 'disk I/O error' but a more specififc error is available Signed-off-by: DL6ER <[email protected]>
… patching Signed-off-by: DL6ER <[email protected]>
f3071e8
to
5252aeb
Compare
After thinking about it, I figured it's actually much easier to simply Whenever SQLite3 is updated in the future, it will be sufficient to replace the files, run Force pushed because |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-20-and-web-v5-18-released/59959/1 |
Thank you for your contribution to the Pi-hole Community!
Please read the comments below to help us consider your Pull Request.
We are all volunteers and completing the process outlined will help us review your commits quicker.
Please make sure you
What does this PR aim to accomplish?:
Print more specific than the standard SQLite3 error codes when available
How does this PR accomplish the above?:
Print extended error code if anything in
dbquery()
failsLink documentation PRs if any are needed to support this PR:
By submitting this pull request, I confirm the following:
git rebase
)