DB_QueryTool, MDB_QueryTool, and error handling
| From: | Daniel O'Connor | Date: | Sat, 25 Oct 2008 06:15:05 +0000 |
| Subject: | DB_QueryTool, MDB_QueryTool, and error handling | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-50907@lists.php.net to get a copy of this message | ||
Does anyone have suggestions on good approaches to fix:
http://pear.php.net/bugs/bug.php?id=14862
In a nutshell, connection to the database happens in the constructor in both
of these packages, and if it's wrong, an error object is returned.
My first instincts are to raise an exception (but can't because it's a PHP4
package), or explicitly pass in the database connection object (that would
be a BC break, but improves testability)
Does anyone have any thoughts?