Skip to content

Commit

Permalink
feat: 增加catch
Browse files Browse the repository at this point in the history
  • Loading branch information
yangmingming committed Oct 27, 2024
1 parent 650ad60 commit 9a6659c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/command/generate/customer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,15 @@ class GenerateCustomer extends Base {
reslove({ imageUriList, isRenderSuccess: true })
}

render()
render().catch(e => {
const error = e as Error

this.log(`${htmlUri}转换图片失败. 错误信息:`, {
"message": error?.message,
"stack": error?.stack,
})
reslove({ imageUriList: [], isRenderSuccess: false })
})
})

}
Expand Down

0 comments on commit 9a6659c

Please sign in to comment.