[Koha-bugs] [Bug 15266] stage-marc-import.pl does not show warning messages on MARC error

2023-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15266

Katrin Fischer  changed:

   What|Removed |Added

Summary|stage-marc-import.pl does   |stage-marc-import.pl does
   |not show warning messages   |not show warning messages
   |on marc error.  |on MARC error

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15266] stage-marc-import.pl does not show warning messages on marc error.

2015-11-30 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15266

Barton Chittenden  changed:

   What|Removed |Added

 CC||bar...@bywatersolutions.com

--- Comment #1 from Barton Chittenden  ---
Created attachment 45231
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45231=edit
Example data -- a marc-utf8 file with errors

The attached file throws the following message in intranet-error.log:

stage-marc-import.pl: Argument "1 15" isn't numeric in integer addition (+) at
/usr/share/perl5/MARC/File/USMARC.pm line 166.

Inspecting that code, I see

156 # Check directory validity
157 ($tagno =~ /^[0-9A-Za-z]{3}$/)
158 or $marc->_warn( "Invalid tag in directory $location:
\"$tagno\"" );
159 
160 ($len =~ /^\d{4}$/)
161 or $marc->_warn( "Invalid length in directory $location tag
$tagno: \"$len\"" );
162 
163 ($offset =~ /^\d{5}$/)
164 or $marc->_warn( "Invalid offset in directory $location tag
$tagno: \"$offset\"" );
165 
166 ($offset + $len <= $reclen)
167 or $marc->_warn( "Directory entry $location runs off the end of
the record tag $tagno" );

The two elements in the addition in line 166 are $offset and $len. The argument
"1 15" doesn't match the regular expression for either $len (^\d{4}$) nor
$offset (^\d{5}$), so it should have triggered one of the $marc->_warn methods,
but these warnings are not sent to intranet-error.log nor to the screen.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/