Merge "mediawiki.api: Remove console warning for legacy token type"
[mediawiki.git] / includes / exception / Hook / LogExceptionHook.php
blob01ec86163ca92917beb17b863dce4bafdbb9d735
1 <?php
3 namespace MediaWiki\Hook;
5 use Throwable;
7 /**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "LogException" to register handlers implementing this interface.
11 * @stable to implement
12 * @ingroup Hooks
14 interface LogExceptionHook {
15 /**
16 * This hook is called before an exception (or PHP error) is logged. This is
17 * meant for integration with external error aggregation services; returning false
18 * will NOT prevent logging.
20 * @since 1.35
22 * @param Throwable $e
23 * @param bool $suppressed True if the error was suppressed via
24 * error_reporting()/wfSuppressWarnings()
25 * @return bool|void True or no return value to continue or false to abort
27 public function onLogException( $e, $suppressed );