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

Implement AfterThrows and AfterFinally advice #1

Open
tylertreat opened this issue Jan 4, 2013 · 0 comments
Open

Implement AfterThrows and AfterFinally advice #1

tylertreat opened this issue Jan 4, 2013 · 0 comments

Comments

@tylertreat
Copy link
Member

AOP currently supportsBefore, Around, and After advice. We would also like to support AfterThrows (invoked after the advised method throws a Throwable) and AfterFinally (invoked after the advised method regardless of whether an exception was thrown).

Visually, the order of these operations looks something like this:

try {
    // Execute Before advice
    advisedObject.advisedMethod(); // Execute Around advice
    // Execute After advice
} catch (Throwable tr) {
    // Execute AfterThrows advice
} finally {
    // Execute AfterFinally advice
}

Thia new advice should be supported by both AdvisedJdkDynamicProxy and AdvisedDexMakerProxy.

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

1 participant