Edited doc comments for hook interfaces to improve consistency and add type hints. Bug: T246855 Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
27 lines
738 B
PHP
27 lines
738 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
use ErrorException;
|
|
use Exception;
|
|
|
|
/**
|
|
* @stable for implementation
|
|
* @ingroup Hooks
|
|
*/
|
|
interface LogExceptionHook {
|
|
/**
|
|
* This hook is called before an exception (or PHP error) is logged. This is
|
|
* meant for integration with external error aggregation services; returning false
|
|
* will NOT prevent logging.
|
|
*
|
|
* @since 1.35
|
|
*
|
|
* @param Exception|ErrorException $e Exception (in case of a plain old PHP error,
|
|
* a wrapping ErrorException)
|
|
* @param bool $suppressed True if the error was suppressed via
|
|
* error_reporting()/wfSuppressWarnings()
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
*/
|
|
public function onLogException( $e, $suppressed );
|
|
}
|