[Bug 21134] New: Wrong error handling in Koha/Patron/Modification.pm hides a bug
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Bug ID: 21134 Summary: Wrong error handling in Koha/Patron/Modification.pm hides a bug Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17767 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17767 [Bug 17767] Let Koha::Patron::Modification handle extended attributes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77342&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- To test you can play with the following snippet: use Koha::Exceptions::Patron::Modification; use Try::Tiny; try { die "this is a specific error"; } catch { Koha::Exceptions::Patron::Modification->throw($@); }; then replace $@ with $_ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77342|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 77343 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77343&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Skipping QA for trivial patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21134 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.10 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org