题目编辑,测试数据上传,评测记录

This commit is contained in:
masnn committed 2020-04-09 21:43:16 +08:00
1 parent 6e28dd868e
commit f055d79fef
9 files changed
+76 -32

No files matched your search

+4 -1
View File
@@ -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;