errorToLce method
Maps an upstream error to LceError
errorData
Evaluates data for error state
Implementation
Stream<LceState<DATA>> errorToLce([DATA? Function(Object error)? errorData]) => transform(
StreamTransformer.fromHandlers(
handleError: (error, stacktrace, sink) {
sink.add(
LceState.error(
null != errorData ? errorData(error) : null,
false,
error is Exception ? error : Exception(error.toString())
)
);
}
)
);