<<

NAME

Koha::Schema::ExceptionMapper - Centralized DBIx::Class exception translation

SYNOPSIS

    use Koha::Schema::ExceptionMapper;

    # Called automatically via Koha::Schema's exception_action hook.
    # No manual invocation needed in normal code.

DESCRIPTION

This utility class provides centralized exception translation from database error messages to Koha-specific exceptions. It is installed as the exception_action handler on Koha::Schema, so all DBIx::Class exceptions are automatically translated before they propagate to callers.

METHODS

translate_exception

    Koha::Schema::ExceptionMapper->translate_exception($msg);

Attempts to translate a database error message into a Koha exception and throw it. If the message does not match any known pattern, returns without throwing, allowing the default DBIx::Class exception handling to proceed.

AUTHOR

Koha Development Team

<<