[Koha-bugs] [Bug 25039] Move new due calculation to Koha::Checkout
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Apr 3 15:38:01 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25039
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kyle at bywatersolutions.com,
| |martin.renvoize at ptfs-europe
| |.com,
| |nick at bywatersolutions.com
--- Comment #6 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(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.
More information about the Koha-bugs
mailing list