mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
vjudge: catch error on running (#610)
This commit is contained in:
1 parent
44373794f6
commit
8f8647f3ee
1 file changed
+2
-1
@@ -16,7 +16,7 @@ class AccountService {
|
|||||||
problemLists: Set<string>;
|
problemLists: Set<string>;
|
||||||
listUpdated = false;
|
listUpdated = false;
|
||||||
working = false;
|
working = false;
|
||||||
error = null;
|
error = '';
|
||||||
|
|
||||||
constructor(public Provider: BasicProvider, public account: RemoteAccount) {
|
constructor(public Provider: BasicProvider, public account: RemoteAccount) {
|
||||||
this.api = new Provider(account, async (data) => {
|
this.api = new Provider(account, async (data) => {
|
||||||
@@ -25,6 +25,7 @@ class AccountService {
|
|||||||
this.problemLists = Set.union(this.api.entryProblemLists || ['main'], this.account.problemLists || []);
|
this.problemLists = Set.union(this.api.entryProblemLists || ['main'], this.account.problemLists || []);
|
||||||
this.main().catch((e) => {
|
this.main().catch((e) => {
|
||||||
logger.error(`Error occured in ${account.type}/${account.handle}`);
|
logger.error(`Error occured in ${account.type}/${account.handle}`);
|
||||||
|
this.working = false;
|
||||||
this.error = e.message;
|
this.error = e.message;
|
||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user