MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / catch

Method catch

Extension/src/Utility/Async/lazy.ts:17–19  ·  view source on GitHub ↗
(onrejected?: (reason: any) => never)

Source from the content-addressed store, hash-verified

15 return (this.#promise ??= Promise.resolve(typeof this.initializer === 'function' ? is.Constructor(this.initializer) ? new this.initializer() : (this.initializer as () => T | Promise<T>)() : this.initializer)).then(onfulfilled, onrejected);
16 }
17 override catch(onrejected?: (reason: any) => never): Promise<T> {
18 return (this.#promise ??= Promise.resolve(typeof this.initializer === 'function' ? is.Constructor(this.initializer) ? new this.initializer() : (this.initializer as () => T | Promise<T>)() : this.initializer)).catch(onrejected);
19 }
20}
21
22/** Returns a promise from a value (value/lambda/constructor) that isn't resolved until is is awaited. */

Callers 15

getScenarioInfoFunction · 0.45
GetDistroInformationMethod · 0.45
deactivateFunction · 0.45
sendTelemetryFunction · 0.45
deactivateFunction · 0.45
logDebuggerEventFunction · 0.45
logLanguageServerEventFunction · 0.45
logCopilotEventFunction · 0.45
statsMethod · 0.45
scanMethod · 0.45
readDirectoryFunction · 0.45
finalizeFunction · 0.45

Calls 2

ConstructorMethod · 0.80
resolveMethod · 0.65

Tested by

no test coverage detected