| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Hook; |
| 4 | |
| 5 | use Throwable; |
| 6 | |
| 7 | /** |
| 8 | * This is a hook handler interface, see docs/Hooks.md. |
| 9 | * Use the hook name "LogException" to register handlers implementing this interface. |
| 10 | * |
| 11 | * @stable to implement |
| 12 | * @ingroup Hooks |
| 13 | */ |
| 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. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 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 |
| 26 | */ |
| 27 | public function onLogException( $e, $suppressed ); |
| 28 | } |