Error Operator - Haufe-Lexware/haufe.no-frills-transformation GitHub Wiki
The Error operator can be used to deliberately cancel the transformation process.
| What | Type |
|---|---|
| Syntax | Error(message) |
message |
any |
| Return type | not applicable |
Using the Error operator cancels the transformation process and outputs the given message as an ERROR to the current <Logger> instance.
This may be useful to give more detailed information on data quality issues which are too grave to be continued processing on.
Example:
<Field name="Status">If($status="1", $status, Error("Status is not 1, illegal status!"))</Field>In this example, the content of the field $status is evaluated. If it does not equal "1", an error is thrown using the Error operator, causing the entire transformation process to be cancelled.