View | Details | Raw Unified | Return to bug 27858
Collapse All | Expand All

(-)a/Koha/Exceptions/Patron/Attribute.pm (-2 / +2 lines)
Lines 32-45 sub full_message { Link Here
32
    unless ( $msg) {
32
    unless ( $msg) {
33
        if ( $self->isa('Koha::Exceptions::Patron::Attribute::NonRepeatable') ) {
33
        if ( $self->isa('Koha::Exceptions::Patron::Attribute::NonRepeatable') ) {
34
            $msg = sprintf(
34
            $msg = sprintf(
35
                "Tried to add more than one non-repeatable attributes. code=%s attribute=%s",
35
                "Tried to add more than one non-repeatable attributes. type=%s value=%s",
36
                $self->attribute->code,
36
                $self->attribute->code,
37
                $self->attribute->attribute
37
                $self->attribute->attribute
38
            );
38
            );
39
        }
39
        }
40
        elsif ( $self->isa('Koha::Exceptions::Patron::Attribute::UniqueIDConstraint') ) {
40
        elsif ( $self->isa('Koha::Exceptions::Patron::Attribute::UniqueIDConstraint') ) {
41
            $msg = sprintf(
41
            $msg = sprintf(
42
                "Your action breaks a unique constraint on the attribute. code=%s attribute=%s",
42
                "Your action breaks a unique constraint on the attribute. type=%s value=%s",
43
                $self->attribute->code,
43
                $self->attribute->code,
44
                $self->attribute->attribute
44
                $self->attribute->attribute
45
            );
45
            );
(-)a/t/Koha/Exceptions.t (-3 / +2 lines)
Lines 220-226 subtest 'Koha::Exceptions::Patron::Attribute::* tests' => sub { Link Here
220
    # stringify the exception
220
    # stringify the exception
221
    is(
221
    is(
222
        "$@",
222
        "$@",
223
        "Tried to add more than one non-repeatable attributes. code=$code attribute=$attribute",
223
        "Tried to add more than one non-repeatable attributes. type=$code value=$attribute",
224
        'Exception stringified correctly'
224
        'Exception stringified correctly'
225
    );
225
    );
226
226
Lines 244-250 subtest 'Koha::Exceptions::Patron::Attribute::* tests' => sub { Link Here
244
    # stringify the exception
244
    # stringify the exception
245
    is(
245
    is(
246
        "$@",
246
        "$@",
247
        "Your action breaks a unique constraint on the attribute. code=$code attribute=$attribute",
247
        "Your action breaks a unique constraint on the attribute. type=$code value=$attribute",
248
        'Exception stringified correctly'
248
        'Exception stringified correctly'
249
    );
249
    );
250
250
251
- 

Return to bug 27858