MediaWiki master
MediaWiki\Maintenance\MaintenanceFatalError Class Reference

Exception thrown by Maintenance::fatalError if called during PHPUnit tests. More...

Inherits Exception.

Collaboration diagram for MediaWiki\Maintenance\MaintenanceFatalError:

Public Member Functions

 __construct (string $msg, int $code)
 

Detailed Description

Exception thrown by Maintenance::fatalError if called during PHPUnit tests.

This is done because calling exit() would cause the test suite to stop early. Use MaintenanceBaseTestCase::expectCallToFatalError() in test cases.

Access: internal
Do not mention in throws annotations, only for use in MaintenanceBaseTestCase

Definition at line 14 of file MaintenanceFatalError.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Maintenance\MaintenanceFatalError::__construct ( string $msg,
int $code )
Parameters
string$msga string to record in the logs about what went wrong
int$codeThe error code that would have been passed to exit() if the method was not called during a PHPUnit test.

Definition at line 20 of file MaintenanceFatalError.php.


The documentation for this class was generated from the following file: