------------------------------------------------ On Wed, 17 Sep 2003 12:49:28 -0400, Dan Anderson <[EMAIL PROTECTED]> wrote:
> Do you mean that you set a debug bool at the beginning of the file and > if (main::$debug) { spit_out_error(); } or you just don't output errors > at all? Doesn't that make debugging much harder? > Sort of, in general I was talking more about catching and handling the error rather than printing or not printing it, meaning that rather than letting DBI do the error handling for me, I would rather catch the error myself and then throw the exception myself depending on what I am doing. Then in my exception I attach the message from DBI (when I want to, which for me is always, but your method would work as well to turn it on and off) using something like $dbh->errstr or $DBI::errstr or $sth->errstr depending on where the error occurred. That way I get the messages to help with debugging, but have complete control over what the "handling an exception" really does. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]