Perl API and error handling
Wed, 18 Feb 2004 09:27:17 +0100
On Tuesday 17 February 2004 19:57, Brad Fitzpatrick wrote:
> Generally I've never needed the return code for failing adds/sets. I'd
> take a patch, though, if you need it.
One can check the serverlogs if errors are happening inside memcached, howe=
this requires a separate script that constantly monitors the memcached logs.
So I think it's nice if the client can take proper action in case if the=20
memcached server returned out of memory, unable to open fd's or=20
> I'm not sure $! is the best place, however. Perhaps
> $memc->err / $memc->errstr like DBI?
Yes that would be neat and surely more elegant than $!
> On Fri, 13 Feb 2004, Joachim Bauernberger wrote:
> > Hi,
> > I was wondering how you guys trap errors in the perl API.
> > If for example $memd->set or $memd->add fails it says that undef is
> > returned, but will I know the reason for the failure (maybe in $!).
> > perldoc Cache::Memcached does not mention this.
> > Thanks & regards,
> > ~/joachim
> > --
> > Phone: +49 (0) 89 490 267 726
> > Fax: +49 (0) 89 490 267 701
> > Mobile: +49 (0) 179 674 3611
> > mailto: firstname.lastname@example.org =A0 =A0 =A0 =A0
> > Web: http://www.friendscout24.de
Phone: +49 (0) 89 490 267 726
=46ax: +49 (0) 89 490 267 701
Mobile: +49 (0) 179 674 3611
mailto: email@example.com =A0 =A0 =A0 =A0=20