A step that always fails (though it may be caught and handled in a <try> step). It contains a single attribute "message", and has no children.
The <raise> step is used to indicate a failure condition without having to construct an artificial step to do so. It most often appears within a <catch> block to propagate an error condition after cleaning up.
Name |
Type |
Required |
Configurable |
Description |
message |
string |
No |
Yes |
A message describing the error condition. Defaults to a generic, system specified message. |
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> |