[Koha-bugs] [Bug 29857] We must stringify our exceptions correctly
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jan 31 16:18:16 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29857
--- Comment #11 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 130011
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130011&action=edit
Bug 29857: Fix behavior
This patch makes:
- passed parameters be rendered alphabetically to allow testing.
- only the defined parameters be rendered in the string
- the method honor the fact that $self->message should be returned if
passed to the constructor (i.e. if the developer called
Koha::Exceptions::MyException->throw( $string ) they will expect $string
to be rendered.
To test:
1. Apply the unit tests patch
2. Run:
$ kshell
k$ prove t/Koha/Exceptions.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list