Bug 21134: Correctly throw the exception in Koha::Patron::Modification->approve
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 31 Jul 2018 15:43:54 +0000 (12:43 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 3 Aug 2018 13:42:50 +0000 (14:42 +0100)
commitc6133753ed661902a9ec3cce14190c7d3d683ef0
tree8931ef6e52894ed6cf8f3b16c28224a0c344e3ba
parent24e4e44c749dc7b4d550028ba966023e1145d484
Bug 21134: Correctly throw the exception in Koha::Patron::Modification->approve

koha_1       |     # Looks like you planned 20 tests but ran 9.
koha_1       |
koha_1       | #   Failed test 'approve tests'
koha_1       | #   at t/db_dependent/Koha/Patron/Modifications.t line
259.
koha_1       | [Something went wrong]# Looks like your test exited with
255 just after 5.
koha_1       | [21:13:47] t/db_dependent/Koha/Patron/Modifications.t
.....................

"Something went wrong" should never been thrown,
Koha::Patron::Modification->approve raises $@, but it's not defined, it
should raise $_ instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e99cfbca7e904b7664163838a334c487c94e462)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Patron/Modification.pm