MCPcopy
hub / github.com/mongodb/node-mongodb-native / _closeEmitterModeWithError

Method _closeEmitterModeWithError

src/change_stream.ts:951–955  ·  view source on GitHub ↗

@internal

(error: AnyError)

Source from the content-addressed store, hash-verified

949
950 /** @internal */
951 private _closeEmitterModeWithError(error: AnyError): void {
952 this.emit(ChangeStream.ERROR, error);
953
954 this.close().then(undefined, squashError);
955 }
956
957 /** @internal */
958 private _streamEvents(cursor: ChangeStreamCursor<TSchema, TChange>): void {

Callers 1

Calls 2

closeMethod · 0.95
emitMethod · 0.65

Tested by

no test coverage detected