mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: throw FormatError when problem data not found
This commit is contained in:
1 parent
785dcc1628
commit
00402f2782
5 files changed
+6
-6
No files matched your search
@@ -182,7 +182,7 @@ export default class Hydro {
|
||||
const [domainId, pid] = source.split('/');
|
||||
const filePath = path.join(getConfig('cache_dir'), this.config.host, source);
|
||||
await fs.ensureDir(filePath);
|
||||
if (!files?.length) throw new SystemError('Problem data not found.');
|
||||
if (!files?.length) throw new FormatError('Problem data not found.');
|
||||
let etags: Record<string, string> = {};
|
||||
try {
|
||||
etags = JSON.parse(fs.readFileSync(path.join(filePath, 'etags')).toString());
|
||||
|
||||
Reference in new issue
Block a user