mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
题目编辑,测试数据上传,评测记录
This commit is contained in:
1 parent
6e28dd868e
commit
f055d79fef
9 files changed
+76
-32
No files matched your search
+4
-1
@@ -128,7 +128,10 @@ MIDDLEWARE(async (ctx, next) => {
|
||||
} else {
|
||||
throw new NotFoundError();
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (e) {
|
||||
let error;
|
||||
if (ctx.body && ctx.body.error) error = ctx.body.error;
|
||||
else error = e;
|
||||
if (error instanceof NotFoundError) ctx.status = 404;
|
||||
if (error.toString().startsWith('NotFoundError')) console.log(error);
|
||||
if (error.toString().startsWith('Template render error')) throw error;
|
||||
|
||||
Reference in new issue
Block a user