MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / OnErrorReturn

Method OnErrorReturn

observable_operator.go:1635–1639  ·  view source on GitHub ↗

OnErrorReturn instructs an Observable to emit an item (returned by a specified function) rather than invoking onError if it encounters an error.

(resumeFunc ErrorFunc, opts ...Option)

Source from the content-addressed store, hash-verified

1633// OnErrorReturn instructs an Observable to emit an item (returned by a specified function)
1634// rather than invoking onError if it encounters an error.
1635func (o *ObservableImpl) OnErrorReturn(resumeFunc ErrorFunc, opts ...Option) Observable {
1636 return observable(o.parent, o, func() operator {
1637 return &onErrorReturnOperator{resumeFunc: resumeFunc}
1638 }, true, false, opts...)
1639}
1640
1641type onErrorReturnOperator struct {
1642 resumeFunc ErrorFunc

Callers

nothing calls this directly

Calls 1

observableFunction · 0.85

Tested by

no test coverage detected