Bugzilla – Attachment 118465 Details for
Bug 27858
Make Koha::Patron::Attribute->store raise an exception on invalid type/code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27858: (follow-up) Consistency in stringified exception
Bug-27858-follow-up-Consistency-in-stringified-exc.patch (text/plain), 2.40 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-03-18 15:07:26 UTC
(
hide
)
Description:
Bug 27858: (follow-up) Consistency in stringified exception
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-03-18 15:07:26 UTC
Size:
2.40 KB
patch
obsolete
>From 455ca14be14a71775397446fa2ac05bb216a76df Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 18 Mar 2021 12:07:00 -0300 >Subject: [PATCH] Bug 27858: (follow-up) Consistency in stringified exception > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Exceptions/Patron/Attribute.pm | 4 ++-- > t/Koha/Exceptions.t | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/Koha/Exceptions/Patron/Attribute.pm b/Koha/Exceptions/Patron/Attribute.pm >index fd9b70cd394..97785d6e2a7 100644 >--- a/Koha/Exceptions/Patron/Attribute.pm >+++ b/Koha/Exceptions/Patron/Attribute.pm >@@ -32,14 +32,14 @@ sub full_message { > unless ( $msg) { > if ( $self->isa('Koha::Exceptions::Patron::Attribute::NonRepeatable') ) { > $msg = sprintf( >- "Tried to add more than one non-repeatable attributes. code=%s attribute=%s", >+ "Tried to add more than one non-repeatable attributes. type=%s value=%s", > $self->attribute->code, > $self->attribute->attribute > ); > } > elsif ( $self->isa('Koha::Exceptions::Patron::Attribute::UniqueIDConstraint') ) { > $msg = sprintf( >- "Your action breaks a unique constraint on the attribute. code=%s attribute=%s", >+ "Your action breaks a unique constraint on the attribute. type=%s value=%s", > $self->attribute->code, > $self->attribute->attribute > ); >diff --git a/t/Koha/Exceptions.t b/t/Koha/Exceptions.t >index 4dbdc0c83c0..908f6546a89 100755 >--- a/t/Koha/Exceptions.t >+++ b/t/Koha/Exceptions.t >@@ -220,7 +220,7 @@ subtest 'Koha::Exceptions::Patron::Attribute::* tests' => sub { > # stringify the exception > is( > "$@", >- "Tried to add more than one non-repeatable attributes. code=$code attribute=$attribute", >+ "Tried to add more than one non-repeatable attributes. type=$code value=$attribute", > 'Exception stringified correctly' > ); > >@@ -244,7 +244,7 @@ subtest 'Koha::Exceptions::Patron::Attribute::* tests' => sub { > # stringify the exception > is( > "$@", >- "Your action breaks a unique constraint on the attribute. code=$code attribute=$attribute", >+ "Your action breaks a unique constraint on the attribute. type=$code value=$attribute", > 'Exception stringified correctly' > ); > >-- >2.31.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27858
:
117678
|
117679
|
117680
|
117713
|
117714
|
117715
|
118465
|
118596
|
118597
|
118598
|
118599
|
118600