for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* Go! AOP framework
*
* @copyright Copyright 2011, Lisachenko Alexander <[email protected]>
* This source file is subject to the license that is bundled
* with this source code in the file LICENSE.
*/
namespace Go\Aop\Framework;
use Go\Aop\AdviceAfter;
use Go\Aop\Intercept\Joinpoint;
use Throwable;
/**
* "After Throwing" interceptor
* @api
final class AfterThrowingInterceptor extends AbstractInterceptor implements AdviceAfter
{
* @inheritdoc
* @throws Throwable
public function invoke(Joinpoint $joinpoint)
try {
return $joinpoint->proceed();
} catch (Throwable $throwableInstance) {
($this->adviceMethod)($joinpoint, $throwableInstance);
throw $throwableInstance;
}