Extension:ErrorHandler

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg
ErrorHandler

Release status:Extension status beta

ImplementationTemplate:Extension#type User interface
DescriptionTemplate:Extension#description Error handler for MediaWiki
Author(s)Template:Extension#username IAlextalk
MediaWikiTemplate:Extension#mediawiki 1.11.0
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
Hooks usedTemplate:Extension#hook
BeforePageDisplayManual:Hooks/BeforePageDisplay

Translate the ErrorHandler extension if it is available at translatewiki.net

Check usage and version matrix.

The ErrorHandler defines a custom error handler (see https://secure.php.net/manual/en/function.set-error-handler.php). Errors will be displayed in the page's subtitle.

Installation[edit]

require_once( "$IP/extensions/ErrorHandler/ErrorHandler.php" );

Configuration[edit]

$wgErrorHandlerReport[edit]

Error levels to report. See https://secure.php.net/manual/en/function.error-reporting.php ($level param).

$wgErrorHandlerShowBackTrace[edit]

Whether to show the backtrace when an error occurs

$wgErrorHandlerMaxStringSize[edit]

Maximum string length of an argument in backtrace

$wgErrorHandlerAlwaysReport[edit]

Always report errors, regardless of the current value of error_reporting()

$wgErrorHandlerReportAfterOutput[edit]

Whether to report errors that occurred after output. This can be used to avoid XHTML errors.

$wgErrorHandlerLog[edit]

Whether to log error:

  • false: don't log them
  • true: log them in PHP error log
  • string and the file exists: logging will be done in that file