Bug #9502

After and After Throwing advices intercept exceptions

Added by Robert Lemke almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
AOP
Start date:
2010-08-30
Due date:
% Done:

100%

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

Related to TYPO3.Flow - Bug #9539: WebRedirect entry point does not work anymore Resolved 2010-08-31

Associated revisions

Revision 04cf8153 (diff)
Added by Robert Lemke almost 9 years ago

[+BUGFIX] FLOW3 (AOP): After and AfterThrowing advice make sure that original exception gets through

Currently both advice types intercept exceptions thrown in the adviced method and deligate the responsibility of rethrowing it to the advice implementation. This patch fixes this behavior and makes sure that the original exception comes through, no matter what.

Change-Id: Ie97697478ce3924e24e7aef888897181827caf0d
Fixes: #9502

Revision 5d23c874 (diff)
Added by Robert Lemke almost 9 years ago

[+BUGFIX] (AOP): After and AfterThrowing advice make sure that original exception gets through

Currently both advice types intercept exceptions thrown in the adviced
method and deligate the responsibility of rethrowing it to the advice
implementation. This patch fixes this behavior and makes sure that the
original exception comes through, no matter what.

Change-Id: Ie97697478ce3924e24e7aef888897181827caf0d
Fixes: #9502

History

#1 Updated by Robert Lemke almost 9 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF