mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-27 17:20:12 +00:00
Improve logging for non-existent categories in the database
Suggested by Chad in the review for 3a8d3b9e0
.
Bug: T179423
Change-Id: I9286ae33bdb3b0b50aa6f1619402caa5486682e3
This commit is contained in:
parent
c78e1c8d75
commit
2c08143ed0
|
@ -21,7 +21,7 @@
|
|||
namespace MediaWiki\Linter;
|
||||
|
||||
use FormatJson;
|
||||
use MWExceptionHandler;
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
|
||||
/**
|
||||
* Database logic
|
||||
|
@ -84,7 +84,10 @@ class Database {
|
|||
try {
|
||||
$name = ( new CategoryManager() )->getCategoryName( $row->linter_cat );
|
||||
} catch ( MissingCategoryException $e ) {
|
||||
MWExceptionHandler::logException( $e );
|
||||
LoggerFactory::getInstance( 'Linter' )->error(
|
||||
'Could not find name for id: {linter_cat}',
|
||||
[ 'linter_cat' => $row->linter_cat ]
|
||||
);
|
||||
return false;
|
||||
}
|
||||
return new LintError(
|
||||
|
|
Loading…
Reference in a new issue