providerDidFail method
- @override
- @mustCallSuper
- ProviderBase<
Object?> provider, - Object error,
- StackTrace stackTrace,
- ProviderContainer container,
A provider emitted an error, be it by throwing during initialization or by having a Future/Stream emit an error
Implementation
@override
@mustCallSuper
void providerDidFail(
ProviderBase<Object?> provider,
Object error,
StackTrace stackTrace,
ProviderContainer container,
) {
super.providerDidFail(provider, error, stackTrace, container);
if (!settings.enabled || !settings.printProviderFailed) {
return;
}
final accepted = settings.providerFilter?.call(provider) ?? true;
if (!accepted) {
return;
}
_talker.logCustom(
RiverpodFailLog(
provider: provider,
providerError: error,
providerStackTrace: stackTrace,
settings: settings,
),
);
}