On Thu, Jan 14, 2016 at 6:51 PM, vinc...@massol.net <vinc...@massol.net>
wrote:

> Hi devs,
>
> Right now our strategy is for script services and script APIs in general
> to catch exceptions, store them and offer a getLastError() method to get
> them (see
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Script+Module#HBestPractices
> )
>
> However it would be much nicer to:
> * Let our script services generate exceptions
> * Offer a velocity script service to get the last exception raised by a
> java call from velocity
> * Implement this uberspector to catch the exceptions and to set them in
> the execution context
>
> That should be quite easy to implement IMO.
>
> WDYT?
>

+1, it's a pain to call setLastError() everywhere there can be an exception
thrown, and we almost always forget to do it (for this reason).

Note that we also have the #try() directive now.

Thanks,
Marius


>
> Thanks
> -Vincent
>
> PS: This is http://jira.xwiki.org/browse/XWIKI-2374
> _______________________________________________
> devs mailing list
> devs@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to