From: mike Date: Thu, 2 Nov 2006 17:56:33 +0000 (+0000) Subject: The ZOOM::Exception constructor now fills in missing $message for X-Git-Tag: cpan_1_22~108 X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=commitdiff_plain;ds=sidebyside;h=74780888cdb9168a4e00399f8f28108223599258;p=ZOOM-Perl-moved-to-github.git The ZOOM::Exception constructor now fills in missing $message for BIB-1 diagnostics as well as ZOOM diagnostics. --- diff --git a/lib/ZOOM.pm b/lib/ZOOM.pm index de906c4..9b12e86 100644 --- a/lib/ZOOM.pm +++ b/lib/ZOOM.pm @@ -1,4 +1,4 @@ -# $Id: ZOOM.pm,v 1.39 2006-11-02 17:07:50 mike Exp $ +# $Id: ZOOM.pm,v 1.40 2006-11-02 17:56:33 mike Exp $ use strict; use warnings; @@ -139,7 +139,7 @@ sub new { my($code, $message, $addinfo, $diagset) = @_; $diagset ||= "ZOOM"; - if ($diagset eq "ZOOM") { + if (uc($diagset) eq "ZOOM" || uc($diagset) eq "BIB-1") { $message ||= ZOOM::diag_str($code); } else { # Should fill in messages for other diagsets, too. @@ -738,7 +738,7 @@ sub records { my $size = $this->size(); if ($start + $count-1 >= $size) { # BIB-1 diagnostic 13 is "Present request out-of-range" - ZOOM::_oops(13, undef, "bib-1"); + ZOOM::_oops(13, undef, "BIB-1"); } my $raw = Net::Z3950::ZOOM::resultset_records($this->_rs(), $start, $count,