Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧐[问题] BaseForm 中为什么要吞掉 onFinish 方法的异常? #9019

Open
majian159 opened this issue Feb 18, 2025 · 0 comments
Open

Comments

@majian159
Copy link

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🧐 问题描述

} catch (error) {
console.log(error);
setLoading(false);
}

吞掉了onFinish中的异常,导致我在ErrorBoundary中无法捕获这个异常发送到 Sentry。
请问有方法可以解决这个问题吗?如果要在每个 调用里面去写这段逻辑会显得很啰嗦。

💻 示例代码

<ProForm onFinish={()=>throw Error("error")}></ProForm>

🚑 其他信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant