catchErrorOnly method
Handles errors emitted by this Future.
Semantically, this is identical to calling catchError.
... except that the type signature of onError
is strengthened. For
historic reasons, the original type signature accepts functions that
will always throw at runtime or have unexpected behavior.
Implementation
Future<T> catchErrorOnly(
void Function(Object? error) onError, {
bool Function(Object error)? test,
}) {
return catchError(onError, test: test);
}