Re: [CDBI] processing mysql errors

[prev] [thread] [next] [Date index for 2005/08/25]

From: Matt S Trout
Subject: Re: [CDBI] processing mysql errors
Date: 11:21 on 25 Aug 2005
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

[CDBI] processing mysql errors
Dave Howorth 11:02 on 25 Aug 2005

Re: [CDBI] processing mysql errors
Matt S Trout 11:21 on 25 Aug 2005

Re: [CDBI] processing mysql errors
David Baird 11:37 on 25 Aug 2005

Re: [CDBI] processing mysql errors
Dave Howorth 11:49 on 25 Aug 2005

Re: [CDBI] processing mysql errors
Matt S Trout 13:01 on 25 Aug 2005

Re: [CDBI] processing mysql errors
Brad Bowman 04:42 on 05 Sep 2005

Re: [CDBI] processing mysql errors
Dave Howorth 09:37 on 06 Sep 2005

Generated at 16:14 on 20 Sep 2005 by mariachi v0.52