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

paul POULAIN paul.poulain at biblibre.com
Mon May 5 14:04:51 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?
>   
I agree this patch was not that clean.
It appears, when you do a ScanIndex, that this sub is called. And, of 
course, there is no valid biblionumber provided, so the GetMarcBiblio 
will fail 100%
the patch solves the problem.
A better patch would have be to handle that before calling the sub. But 
the sub has been introduced recently & I couldn't see how to write a 
"perfect" patch.

Once again, the problem has been introduced recently, by this new sub. 
An example of "better best enemy of good"

-- 
Paul POULAIN
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
Tel : 04 91 31 45 19 




More information about the Koha-patches mailing list