[Koha-bugs] [Bug 30057] Move Virtualshelves exceptions to their own file

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 16 18:54:36 CET 2022


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

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Jonathan Druart from comment #2)
> Is Koha::Exceptions::Virtualshelves::DuplicateObject a
> Koha::Exceptions::Virtualshelf or a Koha::Exceptions::DuplicateObject?

I looked at the code... it is basically a check on the name that's been typed.
Which is not a DB constraint that would raise a
Koha::Exceptions::Object::DuplicateID

It could be Koha::Exceptions::BadParameter too. DuplicatObject doesn't seem to
allow a parameter to notify which attribute is guilty for the failure.

> Shouldn't we actually have a mechanism to inherit from all the exceptions
> defined in Koha::Exception to not need to redefine them in each subclass?

I think that's more aligned with Marcel's proposal, but going even further with
no obvious big gain. Your proposal and Marcel's make me think we could check if
there's another exceptions library that suits our needs better, as we will
end-up doing it all ourselves.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list