orElse(TryResult<T>, () -> R): T | R
Returns the result of the orElse if the previous try result failed if not returns the result of the previous
Introduced in DataWeave 2.2.0. Supported by Mule 4.2 and later.
Parameters
| Name | Description |
|---|---|
|
Previous try result |
|
The next option to try if the previous fails |
Example
This example demonstrates how to specify the next expression to evaluate after a call to try fails.