[Koha-devel] Marseille16 / REST api

Tomas Cohen Arazi tomascohen at gmail.com
Thu Oct 13 10:27:49 CEST 2016


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 (<dcook at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20161013/a6e5be3c/attachment.html>


More information about the Koha-devel mailing list