otherwise method
void
otherwise(
- void buildError(
- MessageHandlerBuilder<
M, D, AsyncError> builder
- MessageHandlerBuilder<
- String? label,
inherited
Adds a message handling behavior that will take place when Result.isError is true.
The buildError callback is used to define the behavior that should take place.
Implementation
void otherwise(
void Function(BError builder) buildError, {
String? label,
}) {
var errorBuilder = _makeErrorBuilder(_resultRef);
buildError(errorBuilder);
_failureDescrRef.value = errorBuilder.descriptor;
}