1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

Add more details to error message

This commit is contained in:
Raymond Hill 2023-11-11 13:25:58 -05:00
parent 130c437dd3
commit 4422926b63
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -174,7 +174,7 @@ async function applyPatchAndValidate(assetDetails, diffDetails) {
i.toString(16).padStart(2, '0')
).join('');
if ( sha1Full.startsWith(checksum) === false ) {
assetDetails.error = 'badchecksum';
assetDetails.error = `badchecksum: expected ${checksum}, computed ${sha1Full.slice(0, checksum.length)}`;
return false;
}
assetDetails.text = textAfter;