Symfony Exception

NotFoundHttpException

HTTP 404 Not Found

Exception

Symfony\Component\HttpKernel\Exception\ NotFoundHttpException

Show exception properties
Symfony\Component\HttpKernel\Exception\NotFoundHttpException {#211
  -statusCode: 404
  -headers: []
}
  1.      * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  2.      */
  3.     public function abort($code, $message = '', array $headers = [])
  4.     {
  5.         if ($code == 404) {
  6.             throw new NotFoundHttpException($message);
  7.         }
  8.         throw new HttpException($code, $message, null, $headers);
  9.     }
  1.      * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  2.      * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  3.      */
  4.     function abort($code, $message = '', array $headers = [])
  5.     {
  6.         app()->abort($code, $message, $headers);
  7.     }
  8. }
  9. if (! function_exists('app')) {
  10.     /**
  1. $router->get('/{page}', function ($page) use ($router) {
  2.     if (view()->exists($page)) {
  3.         return view($page);
  4.     }
  5.     abort(404);
  6. });
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container, $callback, $parameters, $defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
in /home1/smartgas/public_html/vendor/illuminate/container/Util.php :: Illuminate\Container\{closure} (line 41)
  1.      * @param  mixed  ...$args
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value, ...$args)
  5.     {
  6.         return $value instanceof Closure ? $value(...$args) : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.      * @return mixed
  2.      */
  3.     protected static function callBoundMethod($container, $callback, $default)
  4.     {
  5.         if (! is_array($callback)) {
  6.             return Util::unwrapIfClosure($default);
  7.         }
  8.         // Here we need to turn the array callable into a Class@method string we can use to
  9.         // examine the container and see if there are any method bindings for this given
  10.         // method. If there are, we can call this method binding callback immediately.
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container, $callback, $parameters, $defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
  6.         });
  7.     }
  8.     /**
  1.             $this->buildStack[] = $className;
  2.             $pushedToBuildStack = true;
  3.         }
  4.         $result = BoundMethod::call($this, $callback, $parameters, $defaultMethod);
  5.         if ($pushedToBuildStack) {
  6.             array_pop($this->buildStack);
  7.         }
  1.         if (! isset($callable)) {
  2.             throw new RuntimeException('Unable to resolve route handler.');
  3.         }
  4.         try {
  5.             return $this->prepareResponse($this->call($callable, $routeInfo[2]));
  6.         } catch (HttpResponseException $e) {
  7.             return $e->getResponse();
  8.         }
  9.     }
  1.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  2.             }));
  3.         }
  4.         return $this->prepareResponse(
  5.             $this->callActionOnArrayBasedRoute($routeInfo)
  6.         );
  7.     }
  8.     /**
  9.      * Call the Closure or invokable on the array based route.
  1.             case Dispatcher::NOT_FOUND:
  2.                 throw new NotFoundHttpException;
  3.             case Dispatcher::METHOD_NOT_ALLOWED:
  4.                 throw new MethodNotAllowedHttpException($routeInfo[1]);
  5.             case Dispatcher::FOUND:
  6.                 return $this->handleFoundRoute($routeInfo);
  7.         }
  8.     }
  9.     /**
  10.      * Handle a route found by the dispatcher.
  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));
  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.         [$method, $pathInfo] = $this->parseIncomingRequest($request);
  2.         try {
  3.             $this->boot();
  4.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method, $pathInfo) {
  5.                 $this->instance(Request::class, $request);
  6.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  7.                     return $this->handleFoundRoute([true, $this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  8.                 }
  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 /home1/smartgas/public_html/public/index.php (line 56)
  1. */
  2. $app->run();

Stack Trace

NotFoundHttpException
Symfony\Component\HttpKernel\Exception\NotFoundHttpException:

  at /home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:31
  at Laravel\Lumen\Application->abort(404, '', array())
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/helpers.php:24)
  at abort(404)
     (/home1/smartgas/public_html/routes/web.php:287)
  at Closure->{closure}('services')
     (/home1/smartgas/public_html/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/home1/smartgas/public_html/vendor/illuminate/container/Util.php:41)
  at Illuminate\Container\Util::unwrapIfClosure(object(Closure))
     (/home1/smartgas/public_html/vendor/illuminate/container/BoundMethod.php:81)
  at Illuminate\Container\BoundMethod::callBoundMethod(object(Application), object(Closure), object(Closure))
     (/home1/smartgas/public_html/vendor/illuminate/container/BoundMethod.php:35)
  at Illuminate\Container\BoundMethod::call(object(Application), object(Closure), array('page' => 'services'), null)
     (/home1/smartgas/public_html/vendor/illuminate/container/Container.php:662)
  at Illuminate\Container\Container->call(object(Closure), array('page' => 'services'))
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:304)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute(array(1, array(object(Closure)), array('page' => 'services')))
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:269)
  at Laravel\Lumen\Application->handleFoundRoute(array(1, array(object(Closure)), array('page' => 'services')))
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:239)
  at Laravel\Lumen\Application->handleDispatcherResponse(array(1, array(object(Closure)), array('page' => 'services')))
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:174)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(object(Request))
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:431)
  at Laravel\Lumen\Application->sendThroughPipeline(array(), object(Closure))
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:167)
  at Laravel\Lumen\Application->dispatch(null)
     (/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/home1/smartgas/public_html/public/index.php:56)