MediaWiki
master
|
Class to expose exceptions to the client (API bots, users, admins using CLI scripts) More...
Static Public Member Functions | |
static | getHTML (Throwable $e) |
Format an HTML message for the given exception object. More... | |
static | output (Throwable $e, $mode, Throwable $eNew=null) |
static | setShowExceptionDetails (bool $showDetails) |
static | shouldShowExceptionDetails () |
Public Attributes | |
const | AS_PRETTY = 2 |
const | AS_RAW = 1 |
Static Private Member Functions | |
static | getCustomMessage (Throwable $e) |
Extract an additional user-visible message from an exception, or null if it has none. More... | |
static | getExceptionTitle (Throwable $e) |
Get the page title to be used for a given exception. More... | |
static | getShowBacktraceError (Throwable $e) |
static | getText (Throwable $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 (Throwable $e) |
Output the throwable report using HTML. More... | |
static | reportOutageHTML (Throwable $e) |
static | statusHeader ( $code) |
static | useOutputPage (Throwable $e) |
Static Private Attributes | |
static | $showExceptionDetails = false |
Whether to print exceptino details. More... | |
Class to expose exceptions to the client (API bots, users, admins using CLI scripts)
Definition at line 33 of file MWExceptionRenderer.php.
|
staticprivate |
Extract an additional user-visible message from an exception, or null if it has none.
Throwable | $e |
Definition at line 313 of file MWExceptionRenderer.php.
References Message\newFromSpecifier(), and wfMessage().
|
staticprivate |
Get the page title to be used for a given exception.
Throwable | $e |
Definition at line 292 of file MWExceptionRenderer.php.
|
static |
Format an HTML message for the given exception object.
Throwable | $e |
Definition at line 208 of file MWExceptionRenderer.php.
References Html\errorBox(), MWExceptionHandler\getLogMessage(), MWExceptionHandler\getRedactedTraceAsString(), WebRequest\getRequestId(), and MWExceptionHandler\getURL().
Referenced by MediaWiki\run().
|
staticprivate |
|
staticprivate |
Throwable | $e |
Definition at line 266 of file MWExceptionRenderer.php.
References MWExceptionHandler\getLogMessage(), and MWExceptionHandler\getRedactedTraceAsString().
|
staticprivate |
string | $header |
Definition at line 339 of file MWExceptionRenderer.php.
References $header.
|
staticprivate |
Definition at line 332 of file MWExceptionRenderer.php.
|
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 247 of file MWExceptionRenderer.php.
References $fallback, $res, wfMessage(), and wfMsgReplaceArgs().
|
static |
Throwable | $e | Original exception |
int | $mode | MWExceptionExposer::AS_* constant |
Throwable | null | $eNew | New throwable from attempting to show the first |
Definition at line 68 of file MWExceptionRenderer.php.
References MWExceptionHandler\getLogMessage(), MWExceptionHandler\getPublicLogMessage(), and MWExceptionHandler\getRedactedTraceAsString().
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)
string | $message | Failure text |
Definition at line 361 of file MWExceptionRenderer.php.
|
staticprivate |
Output the throwable report using HTML.
Throwable | $e |
Definition at line 171 of file MWExceptionRenderer.php.
References Html\element(), and RequestContext\getMain().
|
staticprivate |
Throwable | $e |
Definition at line 375 of file MWExceptionRenderer.php.
References Html\element().
|
static |
bool | $showDetails |
Definition at line 59 of file MWExceptionRenderer.php.
|
static |
Definition at line 51 of file MWExceptionRenderer.php.
Referenced by ApiMain\errorMessagesFromException(), MediaWiki\ResourceLoader\ResourceLoader\formatExceptionNoComment(), MWException\getHTML(), MWException\getText(), and MediaWiki\Rest\EntryPoint\main().
|
staticprivate |
int | $code |
Definition at line 348 of file MWExceptionRenderer.php.
References HttpStatus\header().
|
staticprivate |
Throwable | $e |
Definition at line 143 of file MWExceptionRenderer.php.
References RequestContext\getMain(), and getTitle().
|
staticprivate |
Whether to print exceptino details.
The default is configured by $wgShowExceptionDetails. May be changed at runtime via MWExceptionRenderer::setShowExceptionDetails().
Definition at line 45 of file MWExceptionRenderer.php.
const MWExceptionRenderer::AS_PRETTY = 2 |
Definition at line 35 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report(), MWLBFactory\reportIfPrefixSet(), MWLBFactory\reportMismatchedDBs(), and MWLBFactory\reportMismatchedPrefixes().
const MWExceptionRenderer::AS_RAW = 1 |
Definition at line 34 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report().