MCPcopy
hub / github.com/tc39/proposal-observable / error

Function error

src/Observable.js:170–200  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

168 },
169
170 error(value) {
171
172 let subscription = this._subscription;
173
174 // If the stream is closed, throw the error to the caller
175 if (subscriptionClosed(subscription)) {
176 return undefined;
177 }
178
179 let observer = subscription._observer;
180 subscription._observer = undefined;
181
182 try {
183
184 let m = getMethod(observer, "error");
185
186 // If the sink does not support "complete", then return undefined
187 if (m) {
188 m.call(observer, value);
189 }
190 else {
191 // HostReportErrors(e);
192 }
193 } catch (e) {
194 // HostReportErrors(e);
195 }
196
197 cleanupSubscription(subscription);
198
199 return undefined;
200 },
201
202 complete() {
203

Callers

nothing calls this directly

Calls 3

subscriptionClosedFunction · 0.85
getMethodFunction · 0.85
cleanupSubscriptionFunction · 0.85

Tested by

no test coverage detected