silverbullet/plugos/util.ts

8 lines
149 B
TypeScript
Raw Normal View History

export function safeRun(fn: () => Promise<void>) {
2022-10-07 20:38:13 +08:00
fn().catch((e: any) => {
console.error("Caught error", e.message);
2022-10-08 21:46:56 +08:00
2022-10-07 20:38:13 +08:00
// throw e;
});
}