Bug #9502
After and After Throwing advices intercept exceptions
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
Associated revisions
[+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
[+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
Applied in changeset 04cf8153232ccfe23535e68df46583be0984962e.