core: 修复acm比赛管理员重测会计入多个罚时的问题

This commit is contained in:
undefined committed 2020-12-10 13:18:25 +08:00
1 parent 16613a6970
commit 7371b0c83c
4 files changed
+19 -10

No files matched your search

+5 -3
View File
@@ -614,8 +614,10 @@ export class Handler {
async onerror(error: HydroError) {
if (!error.msg) error.msg = () => error.message;
console.error(error.msg(), error.params);
console.error(error.stack);
if (!(error instanceof NotFoundError)) {
console.error(error.msg(), error.params);
console.error(error.stack);
}
this.response.status = error instanceof UserFacingError ? error.code : 500;
this.response.template = error instanceof UserFacingError ? 'error.html' : 'bsod.html';
this.response.body = {
@@ -805,7 +807,7 @@ export class ConnectionHandler {
async message(message: any) { } // eslint-disable-line
onerror(err: HydroError) {
console.error(err);
if (!(err instanceof NotFoundError)) console.error(err);
this.send({
error: {
name: err.name,