MediaWiki
1.34.0
|
Class to expose exceptions to the client (API bots, users, admins using CLI scripts) More...
Static Public Member Functions | |
static | getHTML ( $e) |
If $wgShowExceptionDetails is true, return a HTML message with a backtrace to the error, otherwise show a message to ask to set it to true to show that information. More... | |
static | output ( $e, $mode, $eNew=null) |
Public Attributes | |
const | AS_PRETTY = 2 |
const | AS_RAW = 1 |
Static Private Member Functions | |
static | getShowBacktraceError ( $e) |
static | getText ( $e) |
static | header ( $header) |
static | isCommandLine () |
static | msg ( $key, $fallback,... $params) |
Get a message from i18n. More... | |
static | printError ( $message) |
Print a message, if possible to STDERR. More... | |
static | reportHTML ( $e) |
Output the exception report using HTML. More... | |
static | reportOutageHTML ( $e) |
static | statusHeader ( $code) |
static | useOutputPage ( $e) |
Class to expose exceptions to the client (API bots, users, admins using CLI scripts)
Definition at line 29 of file MWExceptionRenderer.php.
|
static |
If $wgShowExceptionDetails is true, return a HTML message with a backtrace to the error, otherwise show a message to ask to set it to true to show that information.
Exception | Throwable | $e |
Definition at line 161 of file MWExceptionRenderer.php.
References $wgShowExceptionDetails, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), WebRequest\getRequestId(), and MWExceptionHandler\getURL().
Referenced by reportHTML(), and MediaWiki\run().
|
staticprivate |
Exception | Throwable | $e |
Definition at line 234 of file MWExceptionRenderer.php.
|
staticprivate |
Exception | Throwable | $e |
Definition at line 218 of file MWExceptionRenderer.php.
References $wgShowExceptionDetails, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), and getShowBacktraceError().
|
staticprivate |
string | $header |
Definition at line 249 of file MWExceptionRenderer.php.
References $header.
Referenced by output(), and reportHTML().
|
staticprivate |
|
staticprivate |
Get a message from i18n.
string | $key | Message name |
string | $fallback | Default message if the message cache can't be called by the exception |
mixed | ...$params To pass to wfMessage() |
Definition at line 197 of file MWExceptionRenderer.php.
References $fallback, $res, $wgSitename, wfMessage(), and wfMsgReplaceArgs().
Referenced by reportHTML().
|
static |
Exception | Throwable | $e | Original exception |
int | $mode | MWExceptionExposer::AS_* constant |
Exception | Throwable | null | $eNew | New exception from attempting to show the first |
Definition at line 38 of file MWExceptionRenderer.php.
References $wgMimeType, $wgShowExceptionDetails, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getPublicLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), getShowBacktraceError(), header(), printError(), reportHTML(), reportOutageHTML(), statusHeader(), and wfHttpError().
Referenced by MWExceptionHandler\report(), MWLBFactory\reportIfPrefixSet(), MWLBFactory\reportMismatchedDBs(), and MWLBFactory\reportMismatchedPrefixes().
|
staticprivate |
Print a message, if possible to STDERR.
Use this in command line mode only (see isCommandLine)
SecurityCheck-XSS
string | $message | Failure text |
Definition at line 271 of file MWExceptionRenderer.php.
Referenced by output().
|
staticprivate |
Output the exception report using HTML.
Exception | Throwable | $e |
Definition at line 114 of file MWExceptionRenderer.php.
References $wgOut, $wgSitename, getHTML(), header(), and msg().
Referenced by output().
|
staticprivate |
Exception | Throwable | $e |
Definition at line 285 of file MWExceptionRenderer.php.
References $wgShowExceptionDetails, $wgShowHostnames, $wgSitename, and MessageCache\singleton().
Referenced by output().
|
staticprivate |
int | $code |
Definition at line 258 of file MWExceptionRenderer.php.
References HttpStatus\header().
Referenced by output().
|
staticprivate |
Exception | Throwable | $e |
Definition at line 89 of file MWExceptionRenderer.php.
References $GLOBALS, and RequestContext\getMain().
const MWExceptionRenderer::AS_PRETTY = 2 |
Definition at line 31 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report(), MWLBFactory\reportIfPrefixSet(), MWLBFactory\reportMismatchedDBs(), and MWLBFactory\reportMismatchedPrefixes().
const MWExceptionRenderer::AS_RAW = 1 |
Definition at line 30 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report().