Re: [CDBI] processing mysql errors
[prev]
[thread]
[next]
[Date index for 2005/08/25]
On Thu, Aug 25, 2005 at 12:02:20PM +0100, Dave Howorth wrote:
> I'd like to do some processing of MySQL database errors, either to
> recover from the condition or to display a more meaningful message to a
> user. I haven't looked into this topic before so I wondered what the
> prior art is and whether there are any CPAN modules that might help with
> this? I'd be grateful for any pointers :)
$dbh->err and $dbh->errstr are probably your friends here, as is overriding
sub _croak in your Class::DBI class to do something different with error
strings there.
There may also be MySQL specific stuff you can do, but you're probably better
reading the DBD docs for that.
--
Matt S Trout Specialists in perl consulting, web development, and
Technical Director UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
|
Re: [CDBI] processing mysql errors
Matt S Trout 11:21 on 25 Aug 2005
|