Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1056

Add ability to specify the name of the variable to store the exception into for the #try() directive

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.3-milestone-1
    • Fix Version/s: 7.4.5, 8.3-milestone-2, 8.2.2
    • Component/s: Velocity
    • Labels:
      None
    • Similar issues:

      Description

      Usage example:

      {{velocity}}
      #try("myexception")
      $services.query.xwql("zzzzz").execute()
      #end
      
      #if ($myexception != '')
        ... do something...
      #end
      {{/velocity}}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                vmassol Vincent Massol
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: