Restructure errors for bad page updates
This commit is contained in:
parent
e3fd6ae47f
commit
7fac86adbb
1 changed files with 5 additions and 5 deletions
|
|
@ -48,9 +48,6 @@ function insertInfoboxEDBID (pageContent, edbID) {
|
||||||
return pageContent.replace(existingReleaseParameter, `$&\n$1|$2id-edb$3=$4${edbID}`)
|
return pageContent.replace(existingReleaseParameter, `$&\n$1|$2id-edb$3=$4${edbID}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.group('Bad page content:');
|
|
||||||
console.log(pageContent);
|
|
||||||
console.groupEnd();
|
|
||||||
throw new Error('Dunno how to insert the parameter into this page');
|
throw new Error('Dunno how to insert the parameter into this page');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -81,8 +78,11 @@ for (const {title} of itemPagesWithoutEDBIDs) {
|
||||||
updatedText = insertInfoboxEDBID(originalText, edbID);
|
updatedText = insertInfoboxEDBID(originalText, edbID);
|
||||||
diff(originalText, updatedText);
|
diff(originalText, updatedText);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log('Error inserting parameter:', error);
|
||||||
console.log('not doing anything with this item');
|
console.group('Bad page content:');
|
||||||
|
console.log(pageContent);
|
||||||
|
console.groupEnd();
|
||||||
|
console.log();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue