MediaWiki
master
MWErrorReporter.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Rest\Reporter
;
4
5
use
MediaWiki\Rest\Handler
;
6
use
MediaWiki\Rest\RequestInterface
;
7
use
MWExceptionHandler
;
8
use Throwable;
9
15
class
MWErrorReporter
implements
ErrorReporter
{
16
22
public
function
reportError
( Throwable $error, ?
Handler
$handler,
RequestInterface
$request ) {
23
MWExceptionHandler::rollbackPrimaryChangesAndLog(
24
$error,
25
MWExceptionHandler::CAUGHT_BY_ENTRYPOINT
26
);
27
}
28
29
}
MWExceptionHandler
Handler class for MWExceptions.
Definition
MWExceptionHandler.php:38
MediaWiki\Rest\Handler
Base class for REST route handlers.
Definition
Handler.php:25
MediaWiki\Rest\Reporter\MWErrorReporter
Error reporter based on MWExceptionHandler.
Definition
MWErrorReporter.php:15
MediaWiki\Rest\Reporter\MWErrorReporter\reportError
reportError(Throwable $error, ?Handler $handler, RequestInterface $request)
Definition
MWErrorReporter.php:22
MediaWiki\Rest\Reporter\ErrorReporter
An ErrorReporter internally reports an error that happened during the handling of a request.
Definition
ErrorReporter.php:15
MediaWiki\Rest\RequestInterface
A request interface similar to PSR-7's ServerRequestInterface.
Definition
RequestInterface.php:39
MediaWiki\Rest\Handler
Copyright (C) 2011-2020 Wikimedia Foundation and others.
Definition
ActionModuleBasedHandler.php:3
MediaWiki\Rest\Reporter
Definition
ErrorReporter.php:3
includes
Rest
Reporter
MWErrorReporter.php
Generated on Sat Dec 14 2024 01:25:49 for MediaWiki by
1.10.0