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

Function ignore

Extension/src/Utility/System/finalize.ts:10–18  ·  view source on GitHub ↗
(fn: () => T | undefined)

Source from the content-addressed store, hash-verified

8import { is } from './guards';
9
10export function ignore<T>(fn: () => T | undefined) {
11 try {
12 return fn();
13 } catch (e: any) {
14 // ignore
15 console.error(`Ignored error in finalize ${e.toString()}\n${e.stack}`);
16 return undefined;
17 }
18}
19const finalized = new WeakSet();
20
21export let ActiveFinalizers = Promise.resolve();

Callers 1

finalizeFunction · 0.85

Calls 2

errorMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected