Symfony Exception

NotFoundHttpException

HTTP 404 Not Found

Exception

Symfony\Component\HttpKernel\Exception\ NotFoundHttpException

  1.      */
  2.     protected function handleDispatcherResponse($routeInfo)
  3.     {
  4.         switch ($routeInfo[0]) {
  5.             case Dispatcher::NOT_FOUND:
  6.                 throw new NotFoundHttpException;
  7.             case Dispatcher::METHOD_NOT_ALLOWED:
  8.                 throw new MethodNotAllowedHttpException($routeInfo[1]);
  9.             case Dispatcher::FOUND:
  10.                 return $this->handleFoundRoute($routeInfo);
  11.         }
  1.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  2.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  3.                 }
  4.                 return $this->handleDispatcherResponse(
  5.                     $this->createDispatcher()->dispatch($method$pathInfo)
  6.                 );
  7.             });
  8.         } catch (Throwable $e) {
  9.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  10.         }
  1.                 ->send($this->make('request'))
  2.                 ->through($middleware)
  3.                 ->then($then);
  4.         }
  5.         return $then($this->make('request'));
  6.     }
  7.     /**
  8.      * Prepare the response for sending.
  9.      *
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
Application->dispatch() in /www/wwwroot/ecshopx-api/app/AppKernel.php (line 73)
  1.         }
  2.     }
  3.     public function directDispatch($request null)
  4.     {
  5.         return parent::dispatch($request);
  6.     }
  7. }
AppKernel->directDispatch() in /www/wwwroot/ecshopx-api/app/AppKernel.php (line 55)
  1.         try {
  2.             $this->boot();
  3.             $response $dingoRequest->handle($this['request'], function($request) {
  4.                 // 当api路由找不到时
  5.                 return $this->directDispatch($request);
  6.             });
  7.             // 统一http响应状态码
  8.             $statusCode $response->getStatusCode();
  9.             if ($statusCode != 200 && $statusCode != 401) {
  10.                 $response->setStatusCode(200);
  1.             $this->exception->report($exception);
  2.             return $this->exception->handle($exception);
  3.         }
  4.         return $next($request);
  5.     }
  6.     /**
  7.      * Send the request through the Dingo router.
  8.      *
Request->handle() in /www/wwwroot/ecshopx-api/app/AppKernel.php (line 56)
  1.         try {
  2.             $this->boot();
  3.             $response $dingoRequest->handle($this['request'], function($request) {
  4.                 // 当api路由找不到时
  5.                 return $this->directDispatch($request);
  6.             });
  7.             // 统一http响应状态码
  8.             $statusCode $response->getStatusCode();
  9.             if ($statusCode != 200 && $statusCode != 401) {
  10.                 $response->setStatusCode(200);
  11.             }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
Application->run() in /www/wwwroot/ecshopx-api/public/index.php (line 31)
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();
  6. // 结束分析
  7. # $xhprof_data = xhprof_disable();
  8. # $XHPROF_ROOT = realpath(dirname(__FILE__) .'/..');
  9. # include_once $XHPROF_ROOT . "/xhprof/xhprof_lib/utils/xhprof_lib.php";

Stack Trace

NotFoundHttpException
Symfony\Component\HttpKernel\Exception\NotFoundHttpException:

  at /www/wwwroot/ecshopx-api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:233
  at Laravel\Lumen\Application->handleDispatcherResponse()
     (/www/wwwroot/ecshopx-api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:173)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/www/wwwroot/ecshopx-api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:429)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/www/wwwroot/ecshopx-api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/www/wwwroot/ecshopx-api/app/AppKernel.php:73)
  at AppKernel->directDispatch()
     (/www/wwwroot/ecshopx-api/app/AppKernel.php:55)
  at AppKernel->{closure}()
     (/www/wwwroot/ecshopx-api/vendor/dingo/api/src/Http/Middleware/Request.php:111)
  at Dingo\Api\Http\Middleware\Request->handle()
     (/www/wwwroot/ecshopx-api/app/AppKernel.php:56)
  at AppKernel->dispatch()
     (/www/wwwroot/ecshopx-api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/www/wwwroot/ecshopx-api/public/index.php:31)