The <raise> element has one optional attribute, message, which is a message that describes the error condition. By default, the message is a generic system-specified message. This attribute can reference simple substitution variables.
The following example shows how the <raise> step is used to repropagate an error condition from within a <catch> block, after noting the error in a log.
<control blockName="default">
<try>
<block>
<!-- some arbitrary processing here -->
</block>
<catch>
<!-- note error in log -->
<execNative>
<exec cmd="appendLog">
<arg value="an error occurred"/>
</exec>
</execNative>
<!-- rethrow error -->
<raise/>
</catch>
</try>
</control>
|