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