]> git.koha-community.org Git - koha.git/commit
Bug 29857: Fix behavior
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 31 Jan 2022 15:07:02 +0000 (12:07 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 2 Mar 2022 08:47:47 +0000 (22:47 -1000)
commit3951145cf79dfc8e3ae0609b7a282bfac9b1f3f0
treea5cd2c6c0aa995565ec42f550da7b6b95445f468
parentc10640e8a72c60e6fd34867ac289312c0ff19705
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@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Exception.pm