Skip to content

Commit c5bd9c9

Browse files
committed
remove prefix when displaying error #263
1 parent cd3f4b5 commit c5bd9c9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/client/debugger/DebugClients/LocalDebugClient.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ export class LocalDebugClient extends DebugClient {
5757
let ptVSToolsPath = path.join(path.dirname(currentFileName), "..", "..", "..", "..", "pythonFiles", "PythonTools");
5858
return path.join(ptVSToolsPath, "visualstudio_py_launcher.py");
5959
}
60-
private displayError(error: any, context: string = "") {
61-
if (!error) { return; }
60+
private displayError(error: any) {
6261
let errorMsg = typeof error === "string" ? error : ((error.message && error.message.length > 0) ? error.message : "");
6362
if (errorMsg.length > 0) {
64-
this.debugSession.sendEvent(new OutputEvent(context + (context.length > 0 ? ": " : "") + errorMsg + "\n", "stderr"));
63+
this.debugSession.sendEvent(new OutputEvent(errorMsg, "stderr"));
6564
}
6665
}
6766
public LaunchApplicationToDebug(dbgServer: IDebugServer, processErrored: (error: any) => void): Promise<any> {
@@ -117,15 +116,15 @@ export class LocalDebugClient extends DebugClient {
117116
//return processErrored(error);
118117
return reject(error);
119118
}
120-
this.displayError(error, "pyProc.error");
119+
this.displayError(error);
121120
});
122121
this.pyProc.stderr.setEncoding("utf8");
123122
this.pyProc.stderr.on("data", error => {
124123
// TODO: This condition makes no sense (refactor)
125124
if (!this.debugServer && this.debugServer.IsRunning) {
126125
return;
127126
}
128-
this.displayError(error, "pyProc.stderr");
127+
this.displayError(error);
129128
});
130129
this.pyProc.stdout.on("data", d => {
131130
// This is necessary so we read the stdout of the python process

0 commit comments

Comments
 (0)