Operator Scope of Action:
Operator First Added:
The fail() operator makes an explicit declares of a failure, and returns false.
Often, in stream processing a failure occurs implicitly, for example because the end of the processed string is reached without finding the desired data. However, sometimes, there is a definite need to signal failure; for example, because the parsed data are invalid.