Skip to content

Commit

Permalink
Fix: better error log
Browse files Browse the repository at this point in the history
  • Loading branch information
lvancraen committed May 15, 2019
1 parent eff587c commit 0b69d5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function checkThatKeysIncludeIndexKeys(sortedKeys, indexKeys, tableName) {
/* Field agency_id is optional in table agency.txt according to the specification. */
throw new Error(
`Keys of table ${tableName} do not contain the index key: ${indexKeys.indexKey}.\n`
+ ` The values are: ${JSON.stringify(indexKeys.indexKey)}`
+ ` The values are: ${sortedKeys}`
);
}

Expand All @@ -139,7 +139,7 @@ function checkThatKeysIncludeIndexKeys(sortedKeys, indexKeys, tableName) {
throw new Error(
`Keys of table ${tableName} do not contain the index keys: `
+ `${indexKeys.firstIndexKey} and ${indexKeys.secondIndexKey}.\n`
+ ` The values are: ${JSON.stringify(indexKeys.indexKey)}`
+ ` The values are: ${sortedKeys}`
);
}
}
Expand Down

0 comments on commit 0b69d5b

Please sign in to comment.