<div dir="ltr">I didn't find you on IRC to talk about it, so I'll do it here.<br><br><div class="gmail_quote"><div dir="ltr">El jue., 13 oct. 2016 a las 1:52, David Cook (<<a href="mailto:dcook@prosentient.com.au">dcook@prosentient.com.au</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-AU" link="blue" vlink="purple" class="gmail_msg"><div class="m_-1753790139981928648WordSection1 gmail_msg"><p class="MsoNormal gmail_msg"><span style="font-family:Calibri,sans-serif;font-size:11pt">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::</span><span style="font-family:Calibri,sans-serif;font-size:11pt">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.</span></p></div></div></blockquote><div><br></div><div>You should look at Jonathan's work on Koha::Virtualshel(f|ves) classes, and how exceptions are handled in (say) <a href="http://shelves.pl">shelves.pl</a> 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.</div><div><br></div><div>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.</div><div><br></div></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Tomás Cohen Arazi</div><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Theke Solutions (<a href="http://theke.io/">https://theke.io</a>)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F</div></div></div>