1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

Report filter list of invalid filter in logger

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2534
This commit is contained in:
Raymond Hill 2023-03-10 06:48:57 -05:00
parent d7b7dea7fa
commit 3c4c3767a2
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1001,6 +1001,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
if ( details.assetKey ) { if ( details.assetKey ) {
writer.properties.set('name', details.assetKey); writer.properties.set('name', details.assetKey);
} }
const assetName = details.assetKey ? details.assetKey : '?';
const expertMode = const expertMode =
details.assetKey !== this.userFiltersPath || details.assetKey !== this.userFiltersPath ||
this.hiddenSettings.filterAuthorMode !== false; this.hiddenSettings.filterAuthorMode !== false;
@ -1031,7 +1032,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
logger.writeOne({ logger.writeOne({
realm: 'message', realm: 'message',
type: 'error', type: 'error',
text: `Invalid filter: ${parser.raw}` text: `Invalid filter (${assetName}): ${parser.raw}`
}); });
continue; continue;
} }