[Koha-patches] [PATCH] returning in case there is no MARC::Record (scanindex)

henridamien.laurent henridamien.laurent at biblibre.com
Mon May 5 13:55:45 CEST 2008


jmf at arwen.metavore.com a écrit :
> General question for everyone: how should errors like the one
> anticipated here be handled. It strikes me that simply returning if
> there is no $record isn't enough ... and there's another case, where the
> $record is present, but corrupted. Any thoughts?
>
> Josh
>   
Very hard to tell what to decide.
I would say that having a general error should not be the solution,
since it is a known issue with bad MARCXML data.
So getting an error 500 is not good.

When can GetMarcBiblio return empty value if we go on with that patch ?
3 ways :
- no biblioitems record (I donot think this is ever tested, but, maybe
should be)
- no xml record in that biblioitems record (no data)
- bad xml record in that biblioitem record (xml not well formed or with
special characters)
In fact, this latest case occurs quite often here in France. (Some
customers of ours are Academic Library, and their data may contain some
TeX code, which is not usually in bibliographic data.)

I think that a special handle could be written in order to cope with
those errors and provide users with good information and not leave them
with Error 500.

So from my point of view, I would say : yes to this patch BUT should add
some code to cope with the error.

-- 
Henri-Damien LAURENT
BibLibre SARL
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
tel : +33 4 67 65 75 50





More information about the Koha-patches mailing list