自动释放锁,优化record.getList()

This commit is contained in:
undefined committed 2020-07-27 17:45:32 +08:00
1 parent d3deeaeb96
commit 2bf6adbaa0
12 files changed
+51 -28

No files matched your search

+6 -2
View File
@@ -391,8 +391,12 @@ export class Handler {
this.response.status = error instanceof UserFacingError ? error.code : 500;
if (this.request.json) this.response.body = { error };
else {
await this.render(error instanceof UserFacingError ? 'error.html' : 'bsod.html', { error })
.catch(() => { });
try {
await this.render(error instanceof UserFacingError ? 'error.html' : 'bsod.html', { error });
} catch (e) {
console.error(e);
// this.response.body.error = {};
}
}
}
await this.putResponse();