MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / swallowExceptions

Function swallowExceptions

src/platform/common/utils/misc.ts:16–25  ·  view source on GitHub ↗
(cb: Function)

Source from the content-addressed store, hash-verified

14 * Execute a block of code ignoring any exceptions.
15 */
16export function swallowExceptions(cb: Function): void {
17 try {
18 const result = cb();
19 if (isPromise(result)) {
20 result.catch(noop);
21 }
22 } catch {
23 // Ignore errors.
24 }
25}
26/**
27 * Like `Readonly<>`, but recursive.
28 *

Callers 11

restoreConnectionMethod · 0.90
createTemporaryFileFunction · 0.90
insertRandomCellsFunction · 0.90
interruptExecutionFunction · 0.90
initializeAfterStartFunction · 0.90
createMethod · 0.90
startMethod · 0.90
initializeInterrupterMethod · 0.90
waitForIdleOnSessionFunction · 0.90
hookUpSessionMethod · 0.90

Calls 1

isPromiseFunction · 0.90

Tested by 1

insertRandomCellsFunction · 0.72