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

--- Comment #42 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 193109
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193109&action=edit
Bug 19871: Update Koha::Patron::Modification to use centralized exception
handling

Replace manual DBIx::Class::Exception handling in the approve() method with
the centralized exception translation system while preserving domain-specific
exception behavior.

Changes:
- Use $schema->safe_do() for database operations with automatic exception
translation
- Wrap safe_do in try/catch to convert any exception to domain-specific
Patron::Modification exception
- Simplify exception handling logic while maintaining the same API contract
- Remove manual DBIx::Class::Exception type checking

This maintains backward compatibility by always throwing
Koha::Exceptions::Patron::Modification exceptions as before, but leverages
the centralized system for consistent database exception handling.

Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to