2022-03-20 16:56:28 +08:00
|
|
|
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;
|
2022-03-20 16:56:28 +08:00
|
|
|
});
|
|
|
|
}
|