| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f3c454c commit 6c7a0eb
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -244,7 +244,13 @@ def watch(self): | |||
| 244 | 244 | try: | |
| 245 | 245 | self._process_request(self._input.readline()) | |
| 246 | 246 | except Exception as ex: | |
| 247 | - message = ex.message + ' \n' + traceback.format_exc() | ||
| 247 | + message = "" | ||
| 248 | + try: | ||
| 249 | + message = ex.message | ||
| 250 | + except: | ||
| 251 | + pass | ||
| 252 | + | ||
| 253 | + message = message + ' \n' + traceback.format_exc() | ||
| 248 | 254 | sys.stderr.write('$ERROR' + str(len(message)) + ':' + message) | |
| 249 | 255 | sys.stderr.flush() | |
| 250 | 256 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,13 +36,13 @@ export class RefactorProxy extends vscode.Disposable { | |||
| 36 | 36 | this._process = null; | |
| 37 | 37 | } | |
| 38 | 38 | extractVariable<T>(document: vscode.TextDocument, name: string, filePath: string, range: vscode.Range): Promise<T> { | |
| 39 | - let command = `{"lookup":"extract_variable", "file":"${filePath}", "start":"${document.offsetAt(range.start)}", "end":"${document.offsetAt(range.end)}", "id":"1", "name":"${name}"}`; | ||
| 40 | - return this.sendCommand<T>(command, REFACTOR.ExtractVariable); | ||
| 39 | + let command = {"lookup":"extract_variable", "file":`"${filePath}"`, "start":document.offsetAt(range.start).toString(), "end":document.offsetAt(range.end).toString(), "id":"1", "name":`"${name}"`}; | ||
| 40 | + return this.sendCommand<T>(JSON.stringify(command), REFACTOR.ExtractVariable); | ||
| 41 | 41 | } | |
| 42 | 42 | extractMethod<T>(document: vscode.TextDocument, name: string, filePath: string, range: vscode.Range): Promise<T> { | |
| 43 | - let command = `{"lookup":"extract_method", "file":"${filePath}", "start":"${document.offsetAt(range.start)}", "end":"${document.offsetAt(range.end)}", "id":"1","name":"${name}"}`; | ||
| 44 | - return this.sendCommand<T>(command, REFACTOR.ExtractVariable); | ||
| 45 | - } | ||
| 43 | + let command = {"lookup":"extract_method", "file":`"${filePath}"`, "start":document.offsetAt(range.start).toString(), "end":document.offsetAt(range.end).toString(), "id":"1","name":`"${name}"`}; | ||
| 44 | + return this.sendCommand<T>(JSON.stringify(command), REFACTOR.ExtractVariable); | ||
| 45 | + } | ||
| 46 | 46 | private sendCommand<T>(command: string, telemetryEvent: string): Promise<T> { | |
| 47 | 47 | let timer = new Delays(); | |
| 48 | 48 | return this.initialize(this.pythonSettings.pythonPath).then(() => { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments