[Koha-bugs] [Bug 18595] Move C4::Members::Messaging to Koha namespace

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 30 13:09:54 CET 2020


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

--- Comment #114 from Lari Taskula <lari.taskula at hypernova.fi> ---
(In reply to Joonas Kylmälä from comment #109)
> More robust input handling in OPAC needed
> =========================================
> 
> In the opac messaging preferences change with the HTML dev console the value
> of "Days in advance" to be 50 and submit the request, you will then get
> following error:
> 
> > days_in_advance has to be a value between 0-30 for Advance_Notice. at /usr/share/perl5/Exception/Class/Base.pm line 88
> 
> Expected outcome: a nicer result is shown to the user about invalid
> parameters, we should handle all errors in the code.

This requires us to revisit Bug 17499. We need more detailed Koha::Exceptions
to have translatable error messages in the GUI. Because now we throw multiple
Koha::Exceptions::BadParameter and specifying the problem in its 'error' field.
While we could parse the error message itself, I don't think that's a good
idea.

Instead we would throw something like
Koha::Exceptions::Patron::Message::Preference::DaysInAdvanceOutOfRange with
'min' and 'max' parameters.

The more formal the exceptions the better.

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


More information about the Koha-bugs mailing list