MediaWiki
1.29.1
|
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) |
static | runHooks ( $e, $name, $args=[]) |
Run hook to allow extensions to modify the text of the exception. More... | |
Public Attributes | |
const | AS_PRETTY = 2 |
const | AS_RAW = 1 |
Static Private Member Functions | |
static | getShowBacktraceError ( $e) |
static | getText ( $e) |
static | googleSearchForm () |
static | header ( $header) |
static | isCommandLine () |
static | msg ( $key, $fallback) |
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 | showBackTrace ( $e) |
static | statusHeader ( $code) |
static | useOutputPage ( $e) |
Class to expose exceptions to the client (API bots, users, admins using CLI scripts)
Definition at line 31 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 218 of file MWExceptionRenderer.php.
References $e, $html, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), WebRequest\getRequestId(), MWExceptionHandler\getURL(), and msg().
Referenced by reportHTML(), and MediaWiki\run().
|
staticprivate |
|
staticprivate |
Exception | Throwable | $e |
Definition at line 264 of file MWExceptionRenderer.php.
References $e, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), and getShowBacktraceError().
|
staticprivate |
Definition at line 392 of file MWExceptionRenderer.php.
References $wgCanonicalServer, $wgRequest, $wgSitename, captcha-old\action, div, form, global, name, style, type, and value.
Referenced by reportOutageHTML().
|
staticprivate |
string | $header |
Definition at line 314 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 The function also has other parameters that are arguments for the message |
Definition at line 251 of file MWExceptionRenderer.php.
References $args, $e, $fallback, wfMessage(), and wfMsgReplaceArgs().
Referenced by getHTML(), and reportHTML().
|
static |
Exception | Throwable | $e | Original exception |
integer | $mode | MWExceptionExposer::AS_* constant |
Exception | Throwable | null | $eNew | New exception from attempting to show the first |
Definition at line 40 of file MWExceptionRenderer.php.
References $e, MWExceptionHandler\getLogMessage(), MWExceptionHandler\getPublicLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), getShowBacktraceError(), global, header(), printError(), reportHTML(), reportOutageHTML(), statusHeader(), and wfHttpError().
Referenced by MWExceptionHandler\report().
|
staticprivate |
Print a message, if possible to STDERR.
Use this in command line mode only (see isCommandLine)
string | $message | Failure text |
Definition at line 335 of file MWExceptionRenderer.php.
Referenced by output().
|
staticprivate |
Output the exception report using HTML.
Exception | Throwable | $e |
Definition at line 161 of file MWExceptionRenderer.php.
References $e, $wgOut, $wgSitename, getHTML(), global, header(), msg(), and runHooks().
Referenced by output().
|
staticprivate |
Exception | Throwable | $e |
Definition at line 349 of file MWExceptionRenderer.php.
References $e, $html, Html\element(), global, googleSearchForm(), and MessageCache\singleton().
Referenced by output().
|
static |
Run hook to allow extensions to modify the text of the exception.
Called by MWException for b/c
Exception | Throwable | $e | |
string | $name | Class name of the exception |
array | $args | Arguments to pass to the callback functions |
Definition at line 97 of file MWExceptionRenderer.php.
References $args, $e, $name, as, captcha-old\count, and global.
Referenced by reportHTML(), and MWException\runHooks().
|
staticprivate |
Exception | Throwable | $e |
Definition at line 278 of file MWExceptionRenderer.php.
|
staticprivate |
integer | $code |
Definition at line 323 of file MWExceptionRenderer.php.
References $code, and HttpStatus\header().
Referenced by output().
|
staticprivate |
Exception | Throwable | $e |
Definition at line 136 of file MWExceptionRenderer.php.
References $e, $GLOBALS, as, and RequestContext\getMain().
const MWExceptionRenderer::AS_PRETTY = 2 |
Definition at line 33 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report().
const MWExceptionRenderer::AS_RAW = 1 |
Definition at line 32 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report().