in reply to Re^2: error catching
in thread error catching
While I don't know what people normally do, the DBI default is for some unexplicable reason to not do that: (from the docs):
False. I was reading just above where you were reading.
By default, "DBI->connect" sets "PrintError" "on"
I agree that you still have to die() if your $sth fails, which I thought I had implied, but it will (by default) at least print the error on its own. The RaiseError is different and actually croak()s instead of just carp()ing.
Update, because it happens to be on my other monitor anyway, here's the relevant source [the comments are mine]:
Carp::croak($msg) if $attr->{RaiseError}; # not default Carp::carp ($msg) if $attr->{PrintError}; # default
-Paul
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: error catching
by Joost (Canon) on Dec 20, 2006 at 01:02 UTC | |
by jettero (Monsignor) on Dec 20, 2006 at 01:05 UTC |