From 0be02044c8dfc4bd43979670589144712aeee30e Mon Sep 17 00:00:00 2001 From: mike Date: Fri, 1 Dec 2006 14:13:41 +0000 Subject: [PATCH] ZOOM::Error::INIT renamed to ZINIT. $rec->exception() returns undef if there's no error. --- lib/ZOOM.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM.pm b/lib/ZOOM.pm index a88be64..cc0cf8e 100644 --- a/lib/ZOOM.pm +++ b/lib/ZOOM.pm @@ -1,4 +1,4 @@ -# $Id: ZOOM.pm,v 1.42 2006-11-28 16:47:19 mike Exp $ +# $Id: ZOOM.pm,v 1.43 2006-12-01 14:13:41 mike Exp $ use strict; use warnings; @@ -34,7 +34,7 @@ sub MEMORY { Net::Z3950::ZOOM::ERROR_MEMORY } sub ENCODE { Net::Z3950::ZOOM::ERROR_ENCODE } sub DECODE { Net::Z3950::ZOOM::ERROR_DECODE } sub CONNECTION_LOST { Net::Z3950::ZOOM::ERROR_CONNECTION_LOST } -sub INIT { Net::Z3950::ZOOM::ERROR_INIT } +sub ZINIT { Net::Z3950::ZOOM::ERROR_INIT } sub INTERNAL { Net::Z3950::ZOOM::ERROR_INTERNAL } sub TIMEOUT { Net::Z3950::ZOOM::ERROR_TIMEOUT } sub UNSUPPORTED_PROTOCOL { Net::Z3950::ZOOM::ERROR_UNSUPPORTED_PROTOCOL } @@ -831,6 +831,7 @@ sub exception { my $this = shift(); my($errcode, $errmsg, $addinfo, $diagset) = $this->error(); + return undef if $errcode == 0; return new ZOOM::Exception($errcode, $errmsg, $addinfo, $diagset); } -- 1.7.10.4