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

Add aop_add_afterthrowing #18

Closed
kdambekalns opened this issue Jul 5, 2012 · 4 comments
Closed

Add aop_add_afterthrowing #18

kdambekalns opened this issue Jul 5, 2012 · 4 comments
Milestone

Comments

@kdambekalns
Copy link
Contributor

It would be nice to be able to declare advice only after a method throws an exception, using aop_add_afterthrowing. The existing aop_add_after() would be a "superset" of this, so to speak… See http://flow3.typo3.org/documentation/guide/partiii/aspectorientedprogramming.html#after-throwing-advice for the FLOW3 documentation on that feature.

@geraldcroes
Copy link
Member

We planned to add a feature named aop_add_exception (maybe the wording could adopt your "afterthrowing") in beta 2.

We will see for the beta 2 if, indeed, aop_add_after should be a superset of aop_add_exception / aop_add_finally (maybe a really good idea)

@geraldcroes
Copy link
Member

Now that I had some time to think about it, I agree that

aop_add_after should run whatever the behaviour of the joinpoint is
aop_add_afterreturning should run when the joinpoint returns normally (no exception)
aop_add_afterthrowing should run when an exception is launched.

Thx again for your input, we'll include this in Beta 2

@kdambekalns
Copy link
Contributor Author

Awesome!

@geraldcroes
Copy link
Member

Done & Tested

e67777e

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

No branches or pull requests

2 participants