3 namespace MediaWiki\Api\Hook
;
5 // phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
6 use MediaWiki\Api\ApiMain
;
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "ApiMain::onException" to register handlers implementing this interface.
13 * @stable to implement
16 interface ApiMain__onExceptionHook
{
18 * This hook is called by ApiMain::executeActionWithErrorHandling() when
19 * an exception is thrown during API action execution.
23 * @param ApiMain $apiMain Calling ApiMain instance
25 * @return bool|void True or no return value to continue or false to abort
27 public function onApiMain__onException( $apiMain, $e );