onError method

  1. @override
  2. @mustCallSuper
void onError(
  1. BlocBase bloc,
  2. Object error,
  3. StackTrace stackTrace
)

Called whenever an error is thrown in any Bloc or Cubit. The stackTrace argument may be StackTrace.empty if an error was received without a stack trace.

Implementation

@override
@mustCallSuper
void onError(BlocBase bloc, Object error, StackTrace stackTrace) {
  super.onError(bloc, error, stackTrace);
  _talker.error('${bloc.runtimeType}', error, stackTrace);
}