From 3ceff70dd7c2ae823dafbb12fab7769c6e361c45 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sun, 12 Jun 2022 21:33:26 +0100 Subject: [PATCH] fix: re add throwing to genericCalcPercent --- server/src/lib/score-import/framework/common/score-utils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/lib/score-import/framework/common/score-utils.ts b/server/src/lib/score-import/framework/common/score-utils.ts index 8af5ba707..59021298f 100644 --- a/server/src/lib/score-import/framework/common/score-utils.ts +++ b/server/src/lib/score-import/framework/common/score-utils.ts @@ -93,6 +93,11 @@ export function GenericCalculatePercent(game: Game, score: number, chart?: Chart case "gitadora": case "itg": return score; + + default: { + logger.severe(`Invalid game passed of ${game} to GenericCalcPercent.`); + throw new InternalFailure(`Invalid game passed of ${game} to GenericCalcPercent.`); + } } }