mediawiki-extensions-AbuseF.../includes/Parser/UserVisibleWarning.php
Daimona Eaytoy 4dbde4dcf0 Use a different message prefix for parser warnings
The abusefilter-warning prefix is reserved for filter warnings. Pointed
out by Matěj.

Change-Id: I169e4c3d29b08c7f5af2136a683fc4427f8e93f5
2021-02-06 15:42:33 +00:00

23 lines
509 B
PHP

<?php
namespace MediaWiki\Extension\AbuseFilter\Parser;
use Message;
/**
* A variant of user-visible exception that is not fatal.
*/
class UserVisibleWarning extends AFPUserVisibleException {
/**
* @return Message
*/
public function getMessageObj() : Message {
// Give grep a chance to find the usages:
// abusefilter-parser-warning-match-empty-regex
return new Message(
'abusefilter-parser-warning-' . $this->mExceptionID,
array_merge( [ $this->mPosition ], $this->mParams )
);
}
}