[Bug 20590] New: Koha::Exceptions does not stringify the exceptions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Bug ID: 20590 Summary: Koha::Exceptions does not stringify the exceptions Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org I was working on bug 20580 and noticed that the exceptions are not stringified and so not really useful when displayed in string context. -- 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=20590 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 74246 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74246&action=edit Bug 20590: Improve Koha::Exceptions in string context I was working on bug 20580 and noticed that the exceptions are not stringified and so not really useful when displayed in string context. This patch is for discussion and not ready for inclusion Still need to fix: Koha/REST/V1/Patrons.pm (The error is "Given xxx does not exist") Koha/Object.pm: in ->store, Koha::Exceptions::Object::FKConstraint is raised but we cannot set 'value' Another note: In Koha::Exceptions::Exception I do not have access to $self->line_number and $self->filename See also http://search.cpan.org/~drolsky/Exception-Class-1.44/lib/Exception/Class/Bas... Test plan: Apply patch from bug 20580 and execute create_superlibrarian.pl with an invalid categorycode -- 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=20590 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ere.maijala@helsinki.fi, | |julian.maurice@biblibre.com | |, | |kyle@bywatersolutions.com, | |m.de.rooy@rijksmuseum.nl, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Hi guys, It seems that our exception classes have few issues. Could you take a look at this patch and give feedbacks? -- 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=20590 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 74556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74556&action=edit Bug 20590: Koha::Exceptions::Exception -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74246|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 74560 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74560&action=edit Bug 20590: Improve Koha::Exceptions in string context I was working on bug 20580 and noticed that the exceptions are not stringified and so not really useful when displayed in string context. This patch is for discussion and not ready for inclusion Still need to fix: Koha/REST/V1/Patrons.pm (The error is "Given xxx does not exist") Koha/Object.pm: in ->store, Koha::Exceptions::Object::FKConstraint is raised but we cannot set 'value' Another note: In Koha::Exceptions::Exception I do not have access to $self->line_number and $self->filename See also http://search.cpan.org/~drolsky/Exception-Class-1.44/lib/Exception/Class/Bas... Test plan: Apply patch from bug 20580 and execute create_superlibrarian.pl with an invalid categorycode Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74556|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 74561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74561&action=edit Bug 20590: Koha::Exceptions::Exception Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 74562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74562&action=edit Bug 20590: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 74563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74563&action=edit Bug 20590: Include Koha::Exceptions::Exception This patch makes Koha::Exceptions::Object include Koha::Exceptions::Exception so it is not required to include it excplicitly for using this exceptions. To test: - Run: $ kshell $k prove t/Koha/Exceptions.t => FAIL: Tests fail because Koha::Exceptions::Exception is not (implicitly or explicitly included) - Apply this patch - Run k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- 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=20590 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74560|0 |1 is obsolete| | Attachment #74561|0 |1 is obsolete| | Attachment #74562|0 |1 is obsolete| | Attachment #74563|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 74583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74583&action=edit Bug 20590: Fix unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74583|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74563|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74562|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74561|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74560|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 74639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74639&action=edit Bug 20590: Fix Members.t 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=20590 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21022 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21022 [Bug 21022] Exceptions should skip stringifying if message manually passed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20590 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- I choose not to backport to 17.11.x, too big and complex -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org