Skip to content

Commit

Permalink
Throw concisely, avoid false-positive error in checkCourtMap()
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Nov 29, 2023
1 parent 152a709 commit b94e607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cultexp/make-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var configPath = path.join(".", "make-data-config.json");
* @param {string} e.message - error message
*/
const handleError = (e) => {
throw e;
// throw e;
console.log(`ERROR: ${e.message}`);
process.exit();
};
Expand Down Expand Up @@ -274,7 +274,7 @@ SetupTool.prototype.addCourtMapEntry = function(line) {
SetupTool.prototype.checkCourtMap = function() {
var missingCodes = [], badCodes = [];
for (var info of this.courtMap) {
if (info[1] === "") {
if (info[0] !== "" && info[1] === "") {
missingCodes.push(info[0]);
} else if (!this.jurisObj[this.defaultJurisdiction].courts[info[1]]) {
badCodes.push(`${info[1]} (${info[0]})`);
Expand Down

0 comments on commit b94e607

Please sign in to comment.