[PEPr] Comment on Database::Sqlite_Tools
| From: | PEPr | Date: | Sun, 04 Jul 2004 04:49:32 +0000 |
| Subject: | [PEPr] Comment on Database::Sqlite_Tools | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-31552@lists.php.net to get a copy of this message | ||
Hans Lellelid (http://pear.php.net/user/hlellelid) has commented on the proposal for
Database::Sqlite_Tools.
Comment:
Awesome class, David. I do a lot of work w/ SQLite, so I'll definitely use it.
One thing that I found myself doing was referring often to the class constants to see what the
message for thrown Exceptions was. (admittedly it's obvious in many/most cases by looking at
context what the throw is.) I noticed also that some constants seem only to be used in one place.
I know the PEAR "way" is to use constants for error messages, but I wonder if it might not
be clearer to just put the plaintext in your class. (Might also improve performance marginally not
to have so many defines.)
The main reason I'd see for using constants is so that the calling code can check the exception
for explicity problems. If that's the intent, maybe use the constants for error codes?
Generally I've found that it doesn't matter too much, as the messages are almost always
for tracking problems rather than programmatic handling.
Anyway, just an observation & a half-suggestion, certainly not a "condition" :) The
class looks great.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=105
--
Sent by PEPr, the automatic proposal system at http://pear.php.net