Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SessionNotFoundException.php

class SessionNotFoundException

Raised when a session does not exist. This happens in the following cases:

  • the session is not enabled
  • attempt to read a session outside a request context (ie. cli script).

@author Jérémy Derussé <jeremy@derusse.com>

Hierarchy

  • class \Symfony\Component\HttpFoundation\Exception\LogicException extends \Symfony\Component\HttpFoundation\Exception\LogicException implements \Symfony\Component\HttpFoundation\Exception\ExceptionInterface
    • class \Symfony\Component\HttpFoundation\Exception\LogicException extends \Symfony\Component\HttpFoundation\Exception\LogicException implements \Symfony\Component\HttpFoundation\Exception\ExceptionInterface
      • class \Symfony\Component\HttpFoundation\Exception\SessionNotFoundException extends \Symfony\Component\HttpFoundation\Exception\LogicException implements \Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface

Expanded class hierarchy of SessionNotFoundException

2 files declare their use of SessionNotFoundException
Request.php in vendor/symfony/http-foundation/Request.php
RequestStack.php in vendor/symfony/http-foundation/RequestStack.php

File

vendor/symfony/http-foundation/Exception/SessionNotFoundException.php, line 21

Namespace

Symfony\Component\HttpFoundation\Exception
View source
class SessionNotFoundException extends \LogicException implements RequestExceptionInterface {
    public function __construct(string $message = 'There is currently no session available.', int $code = 0, ?\Throwable $previous = null) {
        parent::__construct($message, $code, $previous);
    }

}

Members

Title Sort descending Modifiers Object type Summary
SessionNotFoundException::__construct public function
RSS feed
Powered by Drupal