From 9fbe8a5d76a7b85d7e79ea59cd9c7d3fe345f228 Mon Sep 17 00:00:00 2001 From: SantriptaSharma Date: Sun, 15 Oct 2023 02:35:34 +0530 Subject: [PATCH] update (parser): throw error instead of logging --- src/utils/parse-dining.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/parse-dining.ts b/src/utils/parse-dining.ts index f90024c..5903252 100644 --- a/src/utils/parse-dining.ts +++ b/src/utils/parse-dining.ts @@ -35,8 +35,7 @@ async function ParseXlsx(path: string, year: number): Promise wb.worksheets.forEach(menu => { if (!isMenuSheet(menu)) { - console.error("Sheet is not a menu sheet"); - return; + throw new Error("Sheet is not a menu sheet"); } const meals: {[k in Meal]: xl.CellValue[][]} = {