mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: friendly error
This commit is contained in:
1 parent
c86b063415
commit
b406b8989d
4 files changed
+6
-5
No files matched your search
@@ -70,7 +70,7 @@ export default async function readYamlCases(cfg: Record<string, any> = {}, check
|
||||
}
|
||||
if (cfg.time) config.time = parseTimeMS(cfg.time);
|
||||
if (cfg.memory) config.memory = parseMemoryMB(cfg.memory);
|
||||
if (config.type === 'submit_answer' && !cfg.outputs) throw new Error('outputs config not found');
|
||||
if (config.type === 'submit_answer' && !cfg.outputs?.length) throw new Error('outputs config not found');
|
||||
return Object.assign(cfg, config);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user