Bug #9502
After and After Throwing advices intercept exceptions
Status:
Resolved
Priority:
Should have
Assignee:
Category:
AOP
Target version:
Start date:
2010-08-30
Due date:
% Done:
100%
Estimated time:
PHP Version:
Has patch:
Complexity:
Description
Both, After and After Throwing advice, should be triggered after returning from a method or on an exception thrown by a method respectively. However, they must not intercept neither the return value nor the thrown exception. The latter is the case though.
So, currently, if one does not rethrow the exception in one's advice, the exception is swallowed by the advice. That's problematic when using AfterThrowing for logging an exception (e.g. AccessDeniedException) and forgetting about throwing the exception afterwards.
Related issues
Updated by Robert Lemke over 11 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset 04cf8153232ccfe23535e68df46583be0984962e.