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

这个地方解释感觉有点问题 #30

Closed
Petelin opened this issue Dec 1, 2019 · 0 comments
Closed

这个地方解释感觉有点问题 #30

Petelin opened this issue Dec 1, 2019 · 0 comments

Comments

@Petelin
Copy link

Petelin commented Dec 1, 2019

这就是为什么上例中的第二个<code>recover</code>调用不起作用的原因。

我觉得原因应该是这个

recover函数并未直接在一个延迟函数调用中调用。

如果把defer去掉, 直接recover是OK的。因为你没有直接在函数对应的defer中调用, 而是在defer.defer中调用了recover


closed, 我理解错了

@Petelin Petelin closed this as completed Dec 1, 2019
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