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

Method getRemainingTimeMSOrThrow

src/timeout.ts:311–316  ·  view source on GitHub ↗

* @internal * Throws a MongoOperationTimeoutError if the context has expired. * If the context has not expired, returns the `remainingTimeMS`

(message?: string)

Source from the content-addressed store, hash-verified

309 * If the context has not expired, returns the `remainingTimeMS`
310 **/
311 getRemainingTimeMSOrThrow(message?: string): number {
312 const { remainingTimeMS } = this;
313 if (remainingTimeMS <= 0)
314 throw new MongoOperationTimeoutError(message ?? `Expired after ${this.timeoutMS}ms`);
315 return remainingTimeMS;
316 }
317
318 /**
319 * @internal

Callers 9

dropMethod · 0.80
abortMethod · 0.80
handleReadResultFunction · 0.80
initFunction · 0.80
abortMethod · 0.80
checkChunksIndexFunction · 0.80
checkIndexesFunction · 0.80
createDataKeyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected