[Koha-bugs] [Bug 29857] We must stringify our exceptions correctly

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 25 13:09:04 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29857

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #130015|0                           |1
        is obsolete|                            |

--- Comment #38 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 131116
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131116&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>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list