[Koha-patches] [PATCH 2/2] Bug 5415 Let calls of SimpleSearch utilize considtent interface

Chris Nighswonger cnighswonger at foundations.edu
Thu Nov 18 14:14:58 CET 2010


On Thu, Nov 18, 2010 at 7:42 AM, Chris Nighswonger
<cnighswonger at foundations.edu> wrote:
> On Thu, Nov 18, 2010 at 4:56 AM, LAURENT Henri-Damien
> <henridamien.laurent at biblibre.com> wrote:
>> Hi Colin.
>> I have seen that you are using die....
>> There has already been a discussion on that on list.
>> No concensus achieved.
>> But I find it really clunky to have that kind of warning for users :
>> Koha Software error....
>>
>> I acknowledge that a warning has to be raised.
>> Maybe dying is really good practise. But Having more failproof features
>> would be far more comfortable for users (and developers)... When seeing
>> Software error, they will undoubtedly open a new bug... on bugzilla,
>> which is already a bit crowded.
>> Your aim here is surely to HAVE problems reported rather than "hidden"
>> in logs file.
>> But I would have rather, when it is not really a blocking problem, just
>> try and raise a warning.
>>
>> If dying is really a requirement in Modern::Perl then it HAS to be
>> handled in the pl script. And I donot think it is done. Gentlemen ?
>> Can we reach a good practise ?
>
> I am in 100% agreement that we should not die, but rather throw a warn
> to the log and then trap the error, passing useful information back to
> the user and allowing graceful recovery. I can conceive of no problem
> which should not be able to be properly trapped and an error message
> passed back to the user. Even if it is a "blocking problem," graceful
> recovery and or exit is a necessity. With bugzilla accepting emails it
> may even be within the realm of possibility to have something like
> C4::ErrorHandling do automatic bug reporting or the like.
>
> I object to adding new code which just dies rather than handling the error.
>

Correction: Colin's patch does not add a die. It just shows one up
which already exists about line 223 in builkmarcimport.pl.

However, I still hold my position on the use of die.

Kind Regards,
Chris


More information about the Koha-patches mailing list