|
| <try> |
|
Description
-
Try node is similar to the Java try statement. It allows to control
exception occurring within try block.
...
<try>
...
</try>
<catch throwable="java.lang.ArrayIndexOutOfBoundsException">
...
</catch>
<catch throwable="java.net.MalformedURLException">
...
</catch>
<catch>
...
</catch>
<finally>
...
</finally>
... |
If an exception is raised by any child node of the try node, excecution
will fallback to an appropriate catch node, depending on the exception
class. The catch node without attribute catches any
java.lang.Exception instance (ie:
e instanceof java.lang.Exception is true).
Whatever happended in the try block, child nodes of the finally
block are always executed.
Attribute Summary
Name | Default Value | Optional | Accepted Values |
---|
base | | true | |
Attribute Detail
- base
-
this is a generic block attribute that allows URI base redefinition: all
uri attributes used in children nodes of this block will be
relative to this new base definition (except if there is another child block
node that redefines a new base). This is only a convenience attribute in
order to simplify URI specifications. A base attribute must be a valid (well
formed) URI, absolute or relative to another base definition.
Children
- catch, choose, depends, echo, filter, finally, foreach, if, remove, save, sax, source, template, try, variable
|
|