|
@@ -270,8 +270,9 @@ export default function useDraw(winId: number) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- const images = await Promise.all(downloads).catch((error) => {
|
|
|
+ const images = await Promise.all(downloads).catch((error: Error) => {
|
|
|
console.log(error);
|
|
|
+ addLog(`下载图片错误:${error.toString()}`, 'error');
|
|
|
});
|
|
|
if (!images) {
|
|
|
return Promise.reject(new Error('下载图片失败'));
|
|
@@ -334,11 +335,12 @@ export default function useDraw(winId: number) {
|
|
|
};
|
|
|
const tasks = trackData.map((item, index) => draw(item, index + 1));
|
|
|
|
|
|
- const res = await Promise.all(tasks).catch((error) => {
|
|
|
+ const res = await Promise.all(tasks).catch((error: Error) => {
|
|
|
console.log(error);
|
|
|
+ addLog(`绘制轨迹错误:${error.toString()}`, 'error');
|
|
|
});
|
|
|
if (!res) {
|
|
|
- return Promise.reject(new Error('绘制轨迹错误'));
|
|
|
+ return Promise.reject(new Error('绘制轨迹失败'));
|
|
|
}
|
|
|
return res;
|
|
|
}
|