Skip to content

Commit 3c190f5

Browse files
committed
会话已过期提示
1 parent e96e423 commit 3c190f5

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# version 3.1.16
2+
3+
- 会话已过期提示
4+
15
# version 3.1.15
26

37
- 获取题解中增加选项 获取题目的提示

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-leetcode-problem-rating",
33
"displayName": "LeetCode",
44
"description": "%main.description%",
5-
"version": "3.1.15",
5+
"version": "3.1.16",
66
"author": "ccagml",
77
"publisher": "ccagml",
88
"license": "MIT",

src/controller/TreeViewController.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class TreeViewController implements Disposable {
107107

108108
BABA.sendNotification(BabaStr.CommitResult_submitSolutionResult, { resultString: result });
109109
} catch (error) {
110-
await ShowMessage("提交出错了. 请查看控制台信息~", OutPutType.error);
110+
await ShowMessage(`提交出错${error}. 请查看控制台信息~`, OutPutType.error);
111111
return;
112112
}
113113
}
@@ -201,7 +201,7 @@ class TreeViewController implements Disposable {
201201
}
202202
BABA.sendNotification(BabaStr.CommitResult_testSolutionResult, { resultString: result, tsd: tsd });
203203
} catch (error) {
204-
await ShowMessage("提交测试出错了. 请查看控制台信息~", OutPutType.error);
204+
await ShowMessage(`提交测试出错${error}. 请查看控制台信息~`, OutPutType.error);
205205
}
206206
}
207207
/**
@@ -257,7 +257,7 @@ class TreeViewController implements Disposable {
257257
}
258258
BABA.sendNotification(BabaStr.CommitResult_testSolutionResult, { resultString: result, tsd: tsd });
259259
} catch (error) {
260-
await ShowMessage("提交测试出错了. 请查看控制台信息~", OutPutType.error);
260+
await ShowMessage(`提交测试出错${error}. 请查看控制台信息~`, OutPutType.error);
261261
}
262262
}
263263

@@ -304,7 +304,7 @@ class TreeViewController implements Disposable {
304304

305305
BABA.sendNotification(BabaStr.CommitResult_testSolutionResult, { resultString: result, tsd: tsd });
306306
} catch (error) {
307-
await ShowMessage("提交测试出错了. 请查看控制台信息~", OutPutType.error);
307+
await ShowMessage(`提交测试出错${error}. 请查看控制台信息~`, OutPutType.error);
308308
}
309309
}
310310

@@ -344,7 +344,7 @@ class TreeViewController implements Disposable {
344344

345345
BABA.sendNotification(BabaStr.CommitResult_testSolutionResult, { resultString: result, tsd: tsd });
346346
} catch (error) {
347-
await ShowMessage("提交测试出错了. 请查看控制台信息~", OutPutType.error);
347+
await ShowMessage(`提交测试出错${error}. 请查看控制台信息~`, OutPutType.error);
348348
}
349349
}
350350

src/rpc/utils/sessionUtils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Session {
1919
EXPIRED: {
2020
msg: "session expired, please login again",
2121
statusCode: -1,
22+
code: -1000,
2223
},
2324
};
2425
argv: any = {};

src/utils/SystemUtils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@ export async function sysCall(
221221
try_result_json;
222222
}
223223
if (code !== 0 || (try_result_json ? try_result_json.code < 0 : result.indexOf("ERROR") > -1)) {
224-
const error = new Error(
225-
`Command "${command} ${args.toString()}" failed with exit code "${code}". ${result || ""}`
226-
);
224+
const error = new Error(`exit code "${code}". ${result || ""}`);
227225
reject(error);
228226
} else {
229227
resolve(result);

0 commit comments

Comments
 (0)