Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 75a0cc4

Browse files
Merge pull request #1593 from microsoft/dev/gcampbell/FixErrorMessage
fix the error message to output the message, not the object
2 parents b489140 + 217d4eb commit 75a0cc4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/serialmonitor/serialMonitor.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ export class SerialMonitor implements vscode.Disposable {
144144
this.updatePortStatus(true);
145145
} catch (err) {
146146
Logger.warn("Serial Monitor failed to open");
147-
vscode.window.showErrorMessage(`Error opening serial port: ${err.toString()}`);
147+
if (err.message) {
148+
vscode.window.showErrorMessage(`Error opening serial port: ${err.message}`);
149+
}
148150
}
149151
}
150152

0 commit comments

Comments
 (0)