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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #69968|0                           |1
        is obsolete|                            |

--- Comment #6 from Tomás Cohen Arazi <[email protected]> ---
Created attachment 70011
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70011&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.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://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