cujojs / meld

AOP for JS with before, around, on, afterReturning, afterThrowing, after advice, and pointcuts
Other
644 stars 65 forks source link

Indicate how many time proceed() has been called #4

Closed scothis closed 12 years ago

scothis commented 12 years ago

joinpoint.proceedCount() returns that value

travisbot commented 12 years ago

This pull request passes (merged d69ac2be into 04ad1d99).

briancavalier commented 12 years ago

Could you describe the use case you have in mind for needing the proceed count? Since it appears to be a per-around-advice count, why have meld track it as opposed to putting that responsibility on the advice author?

Also, I'd prefer to have it implemented as a property rather than a method, if possible.

scothis commented 12 years ago

I have an aspect that delegates the advice to user provided code. I'd like to ensure that if proceed is not invoked by the user code, the situation is handled appropriately on my end.