I have velocity code for creating a page and I would like to show user a page with customised error message or exception if the exception is caught.
##Retrieve Process file
#try("myexception")
#set($processDoc = $xwiki.getDocument($request.Process))
#set($processID = $processDoc.get('ID'))
#end
#if ($myexception != '' || $proecssID == '')
#displayException("ID Not Found")
{{warning}}ID cannot be found for process{{/warning}}
#end
Does anyone know how to do this?