Symfony Exception

NotFoundHttpException

HTTP 404 Not Found

Sorry, the book you requested does not exist. Please check the URL and try again!

Exception

Symfony\Component\HttpKernel\Exception\ NotFoundHttpException

  1.             $redirect $this->redirecter->lookupRedirect($requestUri);
  2.             if ($redirect) {
  3.                 $response = new RedirectResponse($redirect);
  4.                 $event->setResponse($response);
  5.             } else {
  6.                 throw new NotFoundHttpException(
  7.                     'Sorry, the book you requested does not exist. Please check the URL and try again!'
  8.                 );
  9.             }
  10.         }
  11.     }
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
  1.     {
  2.         if (!$request $request ?: $this->requestStack->getMainRequest()) {
  3.             throw $exception;
  4.         }
  5.         $response $this->handleThrowable($exception$requestself::MAIN_REQUEST);
  6.         $response->sendHeaders();
  7.         $response->sendContent();
  8.         $this->terminate($request$response);
  1.                         if ($hasRun) {
  2.                             throw $e;
  3.                         }
  4.                         $hasRun true;
  5.                         $kernel->terminateWithException($e$request);
  6.                     };
  7.                 }
  8.             } elseif ($event instanceof ConsoleEvent && $app $event->getCommand()->getApplication()) {
  9.                 $output $event->getOutput();
  10.                 if ($output instanceof ConsoleOutputInterface) {
in /var/www/civicrm-docs/vendor/symfony/error-handler/ErrorHandler.php :: Symfony\Component\HttpKernel\EventListener\{closure} (line 541)
  1.             $this->exceptionHandler null;
  2.         }
  3.         try {
  4.             if (null !== $exceptionHandler) {
  5.                 return $exceptionHandler($exception);
  6.             }
  7.             $handlerException $handlerException ?: $exception;
  8.         } catch (\Throwable $handlerException) {
  9.         }
  10.         if ($exception === $handlerException && null === $this->exceptionHandler) {
ErrorHandler->handleException()

Stack Trace

NotFoundHttpException
Symfony\Component\HttpKernel\Exception\NotFoundHttpException:
Sorry, the book you requested does not exist. Please check the URL and try again!

  at /var/www/civicrm-docs/src/EventSubscriber/ExceptionSubscriber.php:31
  at App\EventSubscriber\ExceptionSubscriber->onExceptionEvent()
     (/var/www/civicrm-docs/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:111)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (/var/www/civicrm-docs/vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/civicrm-docs/vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/civicrm-docs/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:152)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/civicrm-docs/vendor/symfony/http-kernel/HttpKernel.php:213)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (/var/www/civicrm-docs/vendor/symfony/http-kernel/HttpKernel.php:106)
  at Symfony\Component\HttpKernel\HttpKernel->terminateWithException()
     (/var/www/civicrm-docs/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:125)
  at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}()
     (/var/www/civicrm-docs/vendor/symfony/error-handler/ErrorHandler.php:541)
  at Symfony\Component\ErrorHandler\ErrorHandler->handleException()