for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* AnimeDb package.
*
* @author Peter Gribanov <[email protected]>
* @copyright Copyright (c) 2014, Peter Gribanov
* @license http://opensource.org/licenses/MIT
*/
namespace AnimeDb\Bundle\CacheTimeKeeperBundle\Event\Listener;
use AnimeDb\Bundle\CacheTimeKeeperBundle\Exception\NotModifiedException;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
class ExceptionListener
{
* @param GetResponseForExceptionEvent $event
public function onKernelException(GetResponseForExceptionEvent $event)
$exception = $event->getException();
if ($exception instanceof NotModifiedException) {
$event->setResponse($exception->getResponse());
}