mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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>;
|
||||
listUpdated = false;
|
||||
working = false;
|
||||
error = null;
|
||||
error = '';
|
||||
|
||||
constructor(public Provider: BasicProvider, public account: RemoteAccount) {
|
||||
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.main().catch((e) => {
|
||||
logger.error(`Error occured in ${account.type}/${account.handle}`);
|
||||
this.working = false;
|
||||
this.error = e.message;
|
||||
console.error(e);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user