Provide additional debugging information (#241)

This commit is contained in:
Héctor Ramos 2017-11-26 21:59:28 -08:00 committed by Joel Marcey
parent ff5f6b578d
commit 1efce743dd

View file

@ -57,8 +57,8 @@ function readCategories(sidebar) {
if (!articles[metadata.next]) {
throw new Error(
metadata.version
? `Improper sidebars file for version ${metadata.version}. Make sure that all documents with ids specified in this version's sidebar file exist and that no ids are repeated.`
: `Improper sidebars.json file. Make sure that documents with the ids specified in sidebars.json exist and that no ids are repeated.`
? `Improper sidebars file for version ${metadata.version}, document with id '${metadata.next}' not found. Make sure that all documents with ids specified in this version's sidebar file exist and that no ids are repeated.`
: `Improper sidebars.json file, document with id '${metadata.next}' not found. Make sure that documents with the ids specified in sidebars.json exist and that no ids are repeated.`
);
}
previous[articles[metadata.next].id] = metadata.id;