MediaWiki REL1_37
|
Class to expose exceptions to the client (API bots, users, admins using CLI scripts) More...
Static Public Member Functions | |
static | getHTML (Throwable $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. | |
static | output (Throwable $e, $mode, Throwable $eNew=null) |
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. | |
static | getExceptionTitle (Throwable $e) |
Get the page title to be used for a given exception. | |
static | getShowBacktraceError (Throwable $e) |
static | getText (Throwable $e) |
static | header ( $header) |
static | isCommandLine () |
static | msg ( $key, $fallback,... $params) |
Get a message from i18n. | |
static | printError ( $message) |
Print a message, if possible to STDERR. | |
static | reportHTML (Throwable $e) |
Output the throwable report using HTML. | |
static | reportOutageHTML (Throwable $e) |
static | statusHeader ( $code) |
static | useOutputPage (Throwable $e) |
Class to expose exceptions to the client (API bots, users, admins using CLI scripts)
Definition at line 32 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 290 of file MWExceptionRenderer.php.
References Message\newFromSpecifier(), and wfMessage().
Referenced by reportHTML().
|
staticprivate |
Get the page title to be used for a given exception.
Throwable | $e |
Definition at line 269 of file MWExceptionRenderer.php.
References msg().
|
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.
Throwable | $e |
Definition at line 185 of file MWExceptionRenderer.php.
References $wgShowExceptionDetails.
Referenced by reportHTML(), and MediaWiki\run().
|
staticprivate |
|
staticprivate |
Throwable | $e |
Definition at line 242 of file MWExceptionRenderer.php.
References $wgShowExceptionDetails, and getShowBacktraceError().
|
staticprivate |
string | $header |
Definition at line 316 of file MWExceptionRenderer.php.
References $header, and header().
Referenced by header(), output(), and reportHTML().
|
staticprivate |
Definition at line 309 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 221 of file MWExceptionRenderer.php.
References $fallback, $res, $wgSitename, wfMessage(), and wfMsgReplaceArgs().
Referenced by getExceptionTitle(), and reportHTML().
|
static |
Throwable | $e | Original exception |
int | $mode | MWExceptionExposer::AS_* constant |
Throwable | null | $eNew | New throwable from attempting to show the first |
Definition at line 41 of file MWExceptionRenderer.php.
References $wgMimeType, $wgShowExceptionDetails, getShowBacktraceError(), header(), print, printError(), reportHTML(), reportOutageHTML(), and statusHeader().
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 338 of file MWExceptionRenderer.php.
Referenced by output().
|
staticprivate |
Output the throwable report using HTML.
Throwable | $e |
Definition at line 145 of file MWExceptionRenderer.php.
References $wgOut, $wgSitename, getCustomMessage(), getHTML(), header(), and msg().
Referenced by output().
|
staticprivate |
Throwable | $e |
Definition at line 352 of file MWExceptionRenderer.php.
References $wgShowExceptionDetails, $wgShowHostnames, and $wgSitename.
Referenced by output().
|
staticprivate |
|
staticprivate |
Throwable | $e |
Definition at line 118 of file MWExceptionRenderer.php.
References getTitle().
const MWExceptionRenderer::AS_PRETTY = 2 |
Definition at line 34 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report(), MWLBFactory\reportIfPrefixSet(), MWLBFactory\reportMismatchedDBs(), and MWLBFactory\reportMismatchedPrefixes().
const MWExceptionRenderer::AS_RAW = 1 |
Definition at line 33 of file MWExceptionRenderer.php.
Referenced by MWExceptionHandler\report().