onErr method

Result<T> onErr(
  1. dynamic f(
    1. Error
    )
)

Calls f(result.err) with side effect if this result is Err. Anyway returns this result as is.

Implementation

Result<T> onErr(Function(Error) f) {
  if (isErr) {
    f(err!);
  }
  return this;
}