MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / catchAsError

Function catchAsError

src/util.ts:621–623  ·  view source on GitHub ↗
(err: unknown, fallbackMessage?: string)

Source from the content-addressed store, hash-verified

619 * @returns
620 */
621export function catchAsError(err: unknown, fallbackMessage?: string): Error {
622 return (err instanceof Error) ? err : Error(fallbackMessage ?? 'Unknown error');
623}
624
625
626

Callers 4

createGitignoreFunction · 0.90
getTemplateItemsFunction · 0.90
getAliasesFromRMethod · 0.90
executeRCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected