The Velocity #try() directive now accepts an optional parameter to specify the name of a Velocity variable into which to save the caught exception. For example:

{{velocity}}
#try("myexception")
$services.query.xwql("zzzzz").execute()
#end

#if ($myexception != '')
  ... do something...
#end
{{/velocity}}
Tags:
Created by Vincent Massol on 2016/09/23
   

Get Connected