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

[Discussion] The demands and suggestions of IOC-golang. IOC-golang 在实际工程中的诉求和建议。 #67

Open
LaurenceLiZhixin opened this issue Jul 1, 2022 · 2 comments

Comments

@LaurenceLiZhixin
Copy link
Collaborator

The demands and suggestions of IOC-golang in practical projects. Including API, concepts, architecture and all related issue can be discussed here.

IOC-golang 在实际工程中的诉求和建议。
包括API、概念、架构相关的内容都可以在这里讨论。

@LaurenceLiZhixin LaurenceLiZhixin pinned this issue Jul 1, 2022
@NicoleRobin
Copy link
Contributor

NicoleRobin commented Aug 8, 2022

IOC-golang/aop/proxy.go

Lines 115 to 118 in 6fb33a0

for _, i := range interceptorImpls {
i.AfterInvoke(invocationCtx)
}

这里的实现,如果在before中有panic的话会导致after执行不到,而且panic会被淹没,
请问下这里是怎么考虑的?
是否考虑改为将after放在defer中来确保一定会被执行到,并且有panic的话再继续把panic传递下去?

@NicoleRobin
Copy link
Contributor

IOC-golang/aop/proxy.go

Lines 115 to 118 in 6fb33a0

for _, i := range interceptorImpls {
i.AfterInvoke(invocationCtx)
}

这里的实现,如果在before中有panic的话会导致after执行不到,而且panic会被淹没, 请问下这里是怎么考虑的? 是否考虑改为将after放在defer中来确保一定会被执行到,并且有panic的话再继续把panic传递下去?

已提pr解决,具体见该pr:#115

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

2 participants