[Bug 21022] New: Exceptions should skip stringifying if message manually passed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Bug ID: 21022 Summary: Exceptions should skip stringifying if message manually passed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Bug 20590 introduced a way to create more useful and testable exception messages. But we should still be allowed to pass manual messages, because we might not have all the information we need to build the stringified version like it proposed. Notably on Koha::Object->store, in which we parse the DBI warning. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20590 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 [Bug 20590] Koha::Exceptions does not stringify the exceptions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76571&action=edit Bug 21022: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76572&action=edit Bug 21022: Use passed message if present This patch makes 'full_message' use the passed exception message instead of trying to build it from the parameters. This is particularly useful for some situations in which we don't have all the information but would like to keep using the same exception. To test: - Apply this patchset - Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass! - Sign off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 76573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76573&action=edit Bug 21022: (follow-up) Move overloaded full_message method to subclass We shouldn't have it overloaded on the base class, as it could get huge and difficult to find things, and read. This patch moves things to Koha::Exceptions::Object. We should overload the full_message method on each exceptions class, as needed. To test: - Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests still pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com 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=21022 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20287 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20287 [Bug 20287] Move AddMember and ModMember to Koha::Patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76571|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 76889 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76889&action=edit Bug 21022: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76572|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 76890 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76890&action=edit Bug 21022: Use passed message if present This patch makes 'full_message' use the passed exception message instead of trying to build it from the parameters. This is particularly useful for some situations in which we don't have all the information but would like to keep using the same exception. To test: - Apply this patchset - Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass! - Sign off Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76573|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 76891 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76891&action=edit Bug 21022: (follow-up) Move overloaded full_message method to subclass We shouldn't have it overloaded on the base class, as it could get huge and difficult to find things, and read. This patch moves things to Koha::Exceptions::Object. We should overload the full_message method on each exceptions class, as needed. To test: - Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests still pass! - Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Seems sane, code is reasonable and well structured, signing off :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76889|0 |1 is obsolete| | Attachment #76890|0 |1 is obsolete| | Attachment #76891|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 76893 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76893&action=edit Bug 21022: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 76894 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76894&action=edit Bug 21022: Use passed message if present This patch makes 'full_message' use the passed exception message instead of trying to build it from the parameters. This is particularly useful for some situations in which we don't have all the information but would like to keep using the same exception. To test: - Apply this patchset - Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass! - Sign off Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 76895 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76895&action=edit Bug 21022: (follow-up) Move overloaded full_message method to subclass We shouldn't have it overloaded on the base class, as it could get huge and difficult to find things, and read. This patch moves things to Koha::Exceptions::Object. We should overload the full_message method on each exceptions class, as needed. To test: - Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests still pass! - Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Bug 21022 depends on bug 20590, which changed state. Bug 20590 Summary: Koha::Exceptions does not stringify the exceptions https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 20590 not in 17.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29857 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29857 [Bug 29857] We must stringify our exceptions correctly -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org