https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19841 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69967|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 69968 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69968&action=edit Bug 19841: Make AddMember raise an exception if categorycode is invalid This patch makes C4::Members::AddMember raise a Koha::Exceptions::BadParameter exception. The current behaviour is to just explode. Code calling AddReturn should work as expected, unless they are looking for a specific failure message. It is just explodes in a way we know what happened, in the case the categorycode is invalid. To test: - Apply the Unit tests patch - Run: $ kshell k$ prove t/db_dependent/Members.t => FAIL: Tests fail because AddReturn doesn't raise an exception - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Members.t => SUCCESS: Tests pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.