diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index 291a996c7..3cd2fc786 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -1,7 +1,7 @@ { "name": "@hydrooj/hydrojudge", "bin": "bin/hydrojudge.js", - "version": "2.12.8", + "version": "2.12.9", "main": "package.json", "author": "undefined ", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/hydrojudge/src/hosts/hydro.ts b/packages/hydrojudge/src/hosts/hydro.ts index 4e815a196..728498604 100644 --- a/packages/hydrojudge/src/hosts/hydro.ts +++ b/packages/hydrojudge/src/hosts/hydro.ts @@ -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 = {}; try { etags = JSON.parse(fs.readFileSync(path.join(filePath, 'etags')).toString()); diff --git a/packages/hydrojudge/src/judge/default.ts b/packages/hydrojudge/src/judge/default.ts index 912cae90a..a3f6b9cd3 100644 --- a/packages/hydrojudge/src/judge/default.ts +++ b/packages/hydrojudge/src/judge/default.ts @@ -5,7 +5,7 @@ import { STATUS } from '@hydrooj/utils/lib/status'; import { check, compileChecker } from '../check'; import compile from '../compile'; import { getConfig } from '../config'; -import { CompileError, SystemError } from '../error'; +import { CompileError, FormatError } from '../error'; import { run } from '../sandbox'; import signals from '../signals'; import { parseFilename } from '../utils'; @@ -134,7 +134,7 @@ function judgeSubtask(subtask, sid: string) { } export const judge = async (ctx) => { - if (!ctx.config.subtasks.length) throw new SystemError('Problem data not found.'); + if (!ctx.config.subtasks.length) throw new FormatError('Problem data not found.'); ctx.next({ status: STATUS.STATUS_COMPILING }); if (ctx.config.template) { if (ctx.config.template[ctx.lang]) { diff --git a/packages/hydrojudge/src/judge/run.ts b/packages/hydrojudge/src/judge/run.ts index 164ff1f16..fba3ca8b4 100644 --- a/packages/hydrojudge/src/judge/run.ts +++ b/packages/hydrojudge/src/judge/run.ts @@ -95,7 +95,7 @@ export const judge = async (ctx) => { status, time_ms: time_usage_ms, memory_kb: memory_usage_kb, - message: message.join('\n').substr(0, 1024000), + message: message.join('\n').substr(0, 102400), }, }); ctx.stat.done = new Date(); diff --git a/packages/hydrojudge/src/service.ts b/packages/hydrojudge/src/service.ts index 049b2ff2f..2c9daf53d 100644 --- a/packages/hydrojudge/src/service.ts +++ b/packages/hydrojudge/src/service.ts @@ -76,7 +76,7 @@ async function postInit() { async function cacheOpen(source: string, files: any[]) { const filePath = path.join(getConfig('cache_dir'), 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 = {}; try { etags = JSON.parse(fs.readFileSync(path.join(filePath, 'etags')).toString());