https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25039

Tomás Cohen Arazi <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |martin.renvoize@ptfs-europe
                   |                            |.com,
                   |                            |[email protected]

--- Comment #6 from Tomás Cohen Arazi <[email protected]> ---
(In reply to Tomás Cohen Arazi from comment #5)
> (In reply to Jonathan Druart from comment #4)
> > I don't think we should start testing all types of all our parameters, that
> > will be a pain.
> > We shoult assume $patron is a Koha::Patron, and *date* is a DateTime.
> 
> I you are implying that this shouldn't be enforced in a coding guideline and
> QA, I *might* agree. But if a bug implements that, I wouldn't reject it
> because of that.
> 
> That said, we've been doing this for a while when we thought it was relevant
> or a good way to notify the caller so they take actions depending on the
> failure.

In this specific case we could just make DateTime explode in a try/catch block
inside this method and raise the same exceptions.

Generally speaking, it is debatable if we should catch them locally or let them
through.  I think it is saner for writing the controllers if we raise our
appropriate exceptions.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
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/

Reply via email to