]> git.koha-community.org Git - koha.git/commit
Bug 27857: (follow-up) Use a more fine-grained exception for mandatory attributes
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 30 Mar 2021 14:03:09 +0000 (11:03 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 9 Apr 2021 13:43:30 +0000 (15:43 +0200)
commite453ff963af6b8f868b7262d32de274c89c582ab
tree6865f7295b9f98f7019d5ebb8c0e65913fe5a60f
parent0d59e57508201778ff4481dcc75be19a0e9a3cd0
Bug 27857: (follow-up) Use a more fine-grained exception for mandatory attributes

On using this dev for the API, I found that the original FKConstraint
exception was too generic, and could be confused with those risen by
Koha::Patron->store. So this patch changes the exception that is thrown
in Koha::Patron->extended_attributes

The change is reflected on the test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Patron.t
=> SUCCESS: Tests pass, and they include the new exception
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patron.pm
t/db_dependent/Koha/Patron.t