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

Breadcrumb

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

class Exception

Same name in this branch
  1. 11.1.x vendor/masterminds/html5/src/HTML5/Exception.php \Masterminds\HTML5\Exception
  2. 11.1.x vendor/phpunit/phpunit/src/Framework/Exception/Exception.php \PHPUnit\Framework\Exception
  3. 11.1.x vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php \PHPUnit\Framework\Constraint\Exception
  4. 11.1.x vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Exception.php \PHPUnit\TextUI\XmlConfiguration\Exception
  5. 11.1.x vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Exception.php \PHPUnit\TextUI\CliArguments\Exception
  6. 11.1.x vendor/lullabot/php-webdriver/lib/WebDriver/Exception.php \WebDriver\Exception
  7. 11.1.x vendor/theseer/tokenizer/src/Exception.php \TheSeer\Tokenizer\Exception
  8. 11.1.x vendor/behat/mink/src/Exception/Exception.php \Behat\Mink\Exception\Exception
  9. 11.1.x vendor/mck89/peast/lib/Peast/Selector/Exception.php \Peast\Selector\Exception
  10. 11.1.x vendor/mck89/peast/lib/Peast/Syntax/Exception.php \Peast\Syntax\Exception

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

@internal This class is not covered by the backward compatibility promise for PHPUnit

Hierarchy

  • class \PHPUnit\Framework\MockObject\Stub\Exception implements \PHPUnit\Framework\MockObject\Stub\Stub

Expanded class hierarchy of Exception

3 files declare their use of Exception
Functions.php in vendor/phpunit/phpunit/src/Framework/Assert/Functions.php
InvocationMocker.php in vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Builder/InvocationMocker.php
TestCase.php in vendor/phpunit/phpunit/src/Framework/TestCase.php
25 string references to 'Exception'
ErrorListener::onControllerArguments in vendor/symfony/http-kernel/EventListener/ErrorListener.php
ExceptionDataCollector::getName in vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php
Returns the name of the collector.
Exporter::prepare in vendor/symfony/var-exporter/Internal/Exporter.php
Prepares an array of values for VarExporter.
Formatter::format in vendor/open-telemetry/api/Behavior/Internal/LogWriter/Formatter.php
FullyQualifiedExceptionsSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Namespaces/FullyQualifiedExceptionsSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

... See full list

File

vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Exception.php, line 20

Namespace

PHPUnit\Framework\MockObject\Stub
View source
final class Exception implements Stub {
    private readonly Throwable $exception;
    public function __construct(Throwable $exception) {
        $this->exception = $exception;
    }
    
    /**
     * @throws Throwable
     */
    public function invoke(Invocation $invocation) : never {
        throw $this->exception;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
Exception::$exception private property
Exception::invoke public function Overrides Stub::invoke
Exception::__construct public function
RSS feed
Powered by Drupal