I didn't find you on IRC to talk about it, so I'll do it here.

El jue., 13 oct. 2016 a las 1:52, David Cook (<dc...@prosentient.com.au>)
escribió:

> However, that’s more human readable than machine readable. Let’s say we’re
> doing a CRUD form for the web UI, and we have something like
> Koha::Exceptions::Object::ValueInvalid. I think we’d want an error code
> or error message that would be easy to catch in the code, and then we relay
> that to the template in a way which allows for translation.
>

You should look at Jonathan's work on Koha::Virtualshel(f|ves) classes, and
how exceptions are handled in (say) shelves.pl because it will be
enlightning on what we were thinking of. It of course covers all your
questions, because that's what we were thinking of.

By the time he wrote that, there was no opinion on Try::Tiny, so he uses
eval, but he propagates the exception information up to the template file
as you suggest you would need to do on your work.

-- 
Tomás Cohen Arazi
Theke Solutions (https://theke.io <http://theke.io/>)
✆ +54 9351 3513384
GPG: B2F3C15F
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to