Bug #9502

After and After Throwing advices intercept exceptions

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

Status:Resolved Start date:2010-08-30
Priority:Should have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:AOP
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 12
PHP Version: Complexity:
Has patch: Affected Flow version:

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
Added by Robert Lemke almost 5 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
Added by Robert Lemke almost 5 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 5 years ago

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

Also available in: Atom PDF