[Koha-patches] [Bug 5379] Pull Request

Galen Charlton gmcharlt at gmail.com
Thu Nov 11 18:37:14 CET 2010


Hi,

On Thu, Nov 11, 2010 at 12:20 PM, Chris Nighswonger
<cnighswonger at foundations.edu> wrote:
> So then to correct the discrepancy introduced by now interpreting undef as
> an error, the current callers should be corrected to understand an undef
> return as a "problem?" (ie. add error-handing)

Adding error-handling would be a good idea in any event.  You wouldn't
have to do it right away for the purpose of this patch, but if you're
offering ... :)

> As an aside: This discussion leads me to wonder where the wisdom of
> returning error/exit "codes" is if we are saying we have a dislike for
> "magic" numbers?

The difference is that (ideally) any routines that return an error
code would also be defining named constants; callers would not be
testing the error code's value directly.  Throwing exceptions
(particularly in the case of failures in the database layer) would be
better yet, but would take more work.

Regards,

Galen
-- 
Galen Charlton
gmcharlt at gmail.com


More information about the Koha-patches mailing list