Koha-clms/Koha/Exceptions/Patron
Tomas Cohen Arazi 540136bb47
Bug 14570: Add error handling to Koha::Patron::Relationship->store
This patch adds checks on the values for the 'relationship'. This is
done to avoid future problems when migrating relationships from the
plain text syspref into (why not) a proper table. And to preserve
consistency.

There's also catching on possible broken constraints and throwing a new
exception

Tests are added for both the new exceptions and the changes to
Koha::Patron::Relationship.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t \
          t/db_dependent/Koha/Patron.t \
          t/db_dependent/Koha/Patron/Relationship.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-20 16:05:57 +01:00
..
Attribute.pm Bug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable 2017-03-31 14:36:47 +00:00
Modification.pm Bug 17767: Make Koha::Patron::Modification handle extended attributes 2016-12-28 13:53:02 +00:00
Relationship.pm Bug 14570: Add error handling to Koha::Patron::Relationship->store 2019-08-20 16:05:57 +01:00