[Koha-bugs] [Bug 27833] Koha::Exceptions::Patron::Attribute::* should have parameters

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 4 13:30:00 CET 2021


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

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

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

--- Comment #10 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 117703
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117703&action=edit
Bug 27833: Make K::P::Attribute add the object to the exception

This patch makes the 'check_unique_id' and '_check_repeatable' methods
pass the 'attribute' parameter when throwing an exception. This way we
can provid emore meaningfull error messages.

To test:
1. Apply the previous patches
2. Run
   $ kshell
  k$ prove t/db_dependent/Koha/Patron/Attributes.t
=> FAIL: The exceptions are not passed the attribute!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: David Nind <david at davidnind.com>
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