From cecb985bee3bdd252e1b8dc0bd500b37cd52be01 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 16 May 2007 20:58:53 +0000 Subject: Aktualisierung auf MediaWiki 1.10.0 Plugins angepasst und verbessert kleine Korrekturen am Design --- includes/Exception.php | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'includes/Exception.php') diff --git a/includes/Exception.php b/includes/Exception.php index ad7ec14a..4cf0b7ba 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -1,5 +1,9 @@ useMessageCache() ) { @@ -21,6 +26,7 @@ class MWException extends Exception } } + /* If wgShowExceptionDetails, return a HTML message with a backtrace to the error. */ function getHTML() { global $wgShowExceptionDetails; if( $wgShowExceptionDetails ) { @@ -33,6 +39,7 @@ class MWException extends Exception } } + /* If wgShowExceptionDetails, return a text message with a backtrace to the error */ function getText() { global $wgShowExceptionDetails; if( $wgShowExceptionDetails ) { @@ -43,7 +50,8 @@ class MWException extends Exception "in LocalSettings.php to show detailed debugging information.

"; } } - + + /* Return titles of this error page */ function getPageTitle() { if ( $this->useMessageCache() ) { return wfMsg( 'internalerror' ); @@ -52,7 +60,10 @@ class MWException extends Exception return "$wgSitename error"; } } - + + /** Return the requested URL and point to file and line number from which the + * exception occured + */ function getLogMessage() { global $wgRequest; $file = $this->getFile(); @@ -60,7 +71,8 @@ class MWException extends Exception $message = $this->getMessage(); return $wgRequest->getRequestURL() . " Exception from line $line of $file: $message"; } - + + /** Output the exception report using HTML */ function reportHTML() { global $wgOut; if ( $this->useOutputPage() ) { @@ -78,11 +90,15 @@ class MWException extends Exception echo $this->htmlFooter(); } } - + + /** Print the exception report using text */ function reportText() { echo $this->getText(); } + /* Output a report about the exception and takes care of formatting. + * It will be either HTML or plain text based on $wgCommandLineMode. + */ function report() { global $wgCommandLineMode; if ( $wgCommandLineMode ) { @@ -125,6 +141,7 @@ class MWException extends Exception /** * Exception class which takes an HTML error message, and does not * produce a backtrace. Replacement for OutputPage::fatalError(). + * @addtogroup Exception */ class FatalError extends MWException { function getHTML() { @@ -136,6 +153,9 @@ class FatalError extends MWException { } } +/** + * @addtogroup Exception + */ class ErrorPageError extends MWException { public $title, $msg; @@ -203,7 +223,7 @@ function wfReportException( Exception $e ) { function wfExceptionHandler( $e ) { global $wgFullyInitialised; wfReportException( $e ); - + // Final cleanup, similar to wfErrorExit() if ( $wgFullyInitialised ) { try { -- cgit v1.2.2