On Fri, Sep 16, 2011 at 5:59 PM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
On 09/16/2011 11:47 AM, Thomas Mortagne wrote:
Hi devs,
Right now it's pretty dangerous to manipulate script services from Velocity.
If even you try to get a service that does not exist that will produce
an exception which will kill your script for good. It's a pain to have
use case like using a service only if it's here and fallback on
something else otherwise.
For example even if you disabled CSRF XWiki will fill in many places
if you even think or removing the csrf jar. That seems pretty bad to
me.
The exception does not bring much value to scripts here (even for
scripts supporting it) so I proposed to return null instead of
throwing an exception.
WDYT ?
Here is my +1.
+1 as well.
Should there be a WARN log entry as well? I'd say no, since it will fill
the logs needlessly.
No since it's not an error, sometimes it's more or less expected that
the service is not here and that in that case you do something else in
your script.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne