Catch SQLite exceptions before they cascade up to Database callers #46
Labels
No labels
admin tools
api
bug
documentation
duplicate
enhancement
feature
help wanted
in progress
internals
invalid
packaging
question
testing
trivial
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: MensBeam/Arsse#46
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The SQLite extension implements exception-based error reporting via the generic Exception class, which makes it difficult to differentiate error generated by the SQLite engine from general PHP errors when dealing with a deep call stack. It would make more sense to catch errors/exceptions within the driver class and send back various types of custom SQL exceptions (syntax error, constraint failure, timeout, whatever).
Moreover, PostgresSQL does not have a class-based PHP interface and does not throw exceptions; an engine abstraction for exceptions is therefore necessary in the long term.