1<?php 2 3namespace MediaWiki\Api\Hook; 4 5// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps 6use ApiMain; 7use Throwable; 8 9/** 10 * @stable to implement 11 * @ingroup Hooks 12 */ 13interface ApiMain__onExceptionHook { 14 /** 15 * This hook is called by ApiMain::executeActionWithErrorHandling() when 16 * an exception is thrown during API action execution. 17 * 18 * @since 1.35 19 * 20 * @param ApiMain $apiMain Calling ApiMain instance 21 * @param Throwable $e 22 * @return bool|void True or no return value to continue or false to abort 23 */ 24 public function onApiMain__onException( $apiMain, $e ); 25} 26