UNPKG

@upstart.gg/sdk

Version:

You can test the CLI without recompiling by running:

15 lines (14 loc) 349 B
//#region src/shared/utils/try-catch.ts /** * Try catch wrapper for async functions */ async function tryCatch(promise) { try { return [null, await promise]; } catch (e) { return [e instanceof Error ? e : /* @__PURE__ */ new Error(`Error in tryCatch: ${e}`), null]; } } //#endregion export { tryCatch }; //# sourceMappingURL=try-catch.js.map