judge: optional error params

This commit is contained in:
undefined committed 2022-05-12 10:50:01 +08:00
1 parent ba3c6bb235
commit 69c6a34c34
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.19.3",
"version": "2.19.4",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+1 -1
View File
@@ -68,7 +68,7 @@ export default async function readCases(folder: string, cfg: Record<string, any>
result.count = Math.sum(result.subtasks.map((i) => i.cases.length));
if (cfg.isSelfSubmission) args.next?.({ message: { message: 'Found {0} testcases.', params: [result.count] } });
} catch (e) {
throw new SystemError('Cannot parse testdata.', [e.message, ...e.params]);
throw new SystemError('Cannot parse testdata.', [e.message, ...(e.params || [])]);
}
}
result.subtasks = normalizeSubtasks(result.subtasks || [], checkFile, config.time, config.memory);