ui: support window.captureException

This commit is contained in:
undefined committed 2022-05-04 20:46:12 +08:00
1 parent 87b980f87d
commit cad010482b
5 files changed
+7 -1

No files matched your search

@@ -51,6 +51,7 @@ export default async function download(filename, targets) {
stream,
};
} catch (e) {
window.captureException?.(e);
stopDownload();
Notification.error(i18n('Download Error', [target.filename, e.toString()]));
}
@@ -144,6 +145,7 @@ export async function downloadProblemSet(pids, name = 'Export') {
}
await download(`${name}.zip`, targets);
} catch (e) {
window.captureException?.(e);
Notification.error(`${e.message} ${e.params?.[0]}`);
}
}