Exceptions
Exception
Symfony\Component\HttpKernel\Exception\ NotFoundHttpException
Show exception properties
Symfony\Component\HttpKernel\Exception\NotFoundHttpException {#827 -statusCode: 404 -headers: [] }
** throw $this->createNotFoundException('Page not found!');*/protected function createNotFoundException(string $message = 'Not Found', ?\Throwable $previous = null): NotFoundHttpException{return new NotFoundHttpException($message, $previous);}/*** Returns an AccessDeniedException.*
AbstractController->createNotFoundException('Fichier du rapport introuvable')
in
src/Controller/ControleController.php
(line 221)
if (!$rapport || !$this->comptesClient->autorise($rapport['id_compte'])) {throw $this->createNotFoundException('Rapport introuvable');}$chemin = $fichiers->uploads().'rapports/'.implode('/', str_split(str_pad((string) $rapport['id_controle'], 6, '0', STR_PAD_LEFT), 3)).'/'.$rapport['id_rapport'].'.pdf';if (!is_file($chemin)) {throw $this->createNotFoundException('Fichier du rapport introuvable');}$nom = $rapport['id_rapport'].'.pdf';$reponse = new BinaryFileResponse($chemin);$reponse->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $nom);
in
vendor/symfony/http-kernel/HttpKernel.php
->
rapport
(line 195)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 77)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 205)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 34)
) {}public function run(): int{$response = $this->kernel->handle($this->request);$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {fastcgi_finish_request();
in
vendor/autoload_runtime.php
->
run
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return static function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 23:28:14 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "a4109a"
},
"request_uri": "https://dev2-pulvegestion.mapyourdream.com/_profiler/a4109a",
"method": "GET"
}
|
Stack Trace
|
NotFoundHttpException
|
|---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException:
Fichier du rapport introuvable
at vendor/symfony/framework-bundle/Controller/AbstractController.php:331
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createNotFoundException('Fichier du rapport introuvable')
(src/Controller/ControleController.php:221)
at App\Controller\ControleController->rapport(object(Request), object(Fichiers))
(vendor/symfony/http-kernel/HttpKernel.php:195)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:77)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:205)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/var/www/vendor/autoload_runtime.php')
(public/index.php:5)
|