![]() |
sponsored links |
|
|
sponsored links
|
|
|
7
12th August 15:19
External User
Posts: 1
|
I've actually had issues in the past with PDO and non-exception error-mode
handling. I had queries that were running fine but when I checked the error value it gave a non-OK value. (I forget what off hand.) As soon as I switched to exceptions, it worked perfectly. I believe this was under 5.2.1. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
9
12th August 15:20
External User
Posts: 1
|
I agree, although at the time I wasn't at the point where I could make a
viable bug report out of it. I was writing a database wrapper layer around PDO (actually porting PDO into an existing wrapper), and did find in the end that exception-based checking, even though it never left the wrapping function I had around the actual query, made the code a lot nicer to deal with than an if-check in each case. The errors also made more sense, at least to me, than trying to get the error out of the returned error array with a variable number of entries in it. In any case, I don't find the exception usage of PDO to be a bad thing. I agree it should remain possible to use PHP without having dozens of try and catch blocks around everything, but remember that Exceptions are popular exactly because they are a clean and powerful mechanism. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php |
|