[Koha-bugs] [Bug 20287] Move AddMember and ModMember to Koha::Patron
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 25 18:18:59 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20287
--- Comment #12 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Tomás Cohen Arazi from comment #11)
> Jonathan
>
> Pattern
> =======
> I'm not sure about the pattern you are using in ->store. Take a look here:
>
> http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/Storage.pm#txn_do
>
> Basically, txn_do is encapsulating the exception you are raising, and so the
> behaviour is not the expected one.
I am not sure to understand your point here,
Koha::Exceptions::Object::FKConstraint is raised and correctly propagated.
> Failure in Object.t
> ===================
> Regarding the failure in Object.t, I agree we should pick a more simple
> object (I guess Koha::Patron was the first we introduced and was pretty
> simple until this patchset).
I have added a new commit ("Use more simple object for Object.t")
> Exceptions
> ==========
> On bug 20590 we introduced Koha::Exceptions::Exception->full_message (which
> should be moved into the implementing class (in the case you implemented,
> Koha::Exceptions::Object) but the way it is implemented works for the use
> case you wrote, but not for Koha::Object->store.
I think these patches highlight that the our exception system need to be
reworked a bit and I think it's outside the scope of this bug. We should
address it ASAP, once this pushed.
See also new commit "Test exception DuplicateID for Koha::Patron->store"
Remote branch has been rebased and the 2 commits added.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list