|
1 | 1 | import * as fs from "fs-extra"; |
2 | 2 | import { commands, ConfigurationTarget, ExtensionContext, window, workspace } from "vscode"; |
3 | | -import { CloseAction, ErrorAction, ErrorHandler, Message } from "vscode-languageclient"; |
| 3 | +import { CloseAction, CloseHandlerResult, ErrorAction, ErrorHandler, ErrorHandlerResult, Message } from "vscode-languageclient"; |
4 | 4 | import * as ClientCommandConstants from "../commands/clientCommandConstants"; |
5 | 5 | import { HEAP_DUMP_LOCATION } from "../server/java/jvmArguments"; |
6 | 6 | import * as Telemetry from "../telemetry"; |
@@ -28,11 +28,19 @@ export class ClientErrorHandler implements ErrorHandler { |
28 | 28 | this.heapDumpFolder = getHeapDumpFolderFromSettings() || context.globalStorageUri.fsPath; |
29 | 29 | } |
30 | 30 |
|
31 | | - error(_error: Error, _message: Message, _count: number): ErrorAction { |
32 | | - return ErrorAction.Continue; |
| 31 | + error(_error: Error, _message: Message, _count: number): ErrorHandlerResult { |
| 32 | + return { |
| 33 | + action: ErrorAction.Continue |
| 34 | + }; |
33 | 35 | } |
34 | 36 |
|
35 | | - closed(): CloseAction { |
| 37 | + closed(): CloseHandlerResult { |
| 38 | + return { |
| 39 | + action: this.doClosed() |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | + doClosed(): CloseAction { |
36 | 44 | this.restarts.push(Date.now()); |
37 | 45 | const heapProfileGlob = new glob.GlobSync(`${this.heapDumpFolder}/java_*.hprof`); |
38 | 46 | if (heapProfileGlob.found.length) { |
|
0 commit comments