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
1 changed files with 2 additions and 1 deletions

View File

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