[Koha-bugs] [Bug 25032] Generic unhandled exception handling

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 2 21:34:32 CEST 2020


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

--- Comment #8 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Ok, I have submitted a a testable patch set. I added changes to all controller
methods so they just use the new helper. A simple diff shows we needed this :-D

- The only logic change in the controllers is (in a small number of cases) just
wrapping the code in a try/catch construct having $c->unhandled_exception($_);
in the catch block.

- There's a change in the Password.pm controller removing an exception throwing
to simplifly it a bit and making it similar to the other method.

- I haven't touched Auth.pm (yet), if I do I would like to do it on a separate
bug, being it a sensible part of the API codebase.

- There are several endpoints already! Having the chance to review them all, I
found several inconsistencies I will try to deal with on separate bugs for
clarity (for example bug 25048).

If this approach is palatable to you, please SO and QA fast so we can add this
to the guidelines and people start coding using this.

The API has the advantage we've enforced full coverage, and this patches change
untestable conditions, i.e. some catch-all code we added just in case, so all
tests should pass with or without the patches.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list