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

Commit 3659e4a

Browse files
fix the error message to output the message, not the object
1 parent b489140 commit 3659e4a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/serialmonitor/serialMonitor.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ 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+
}
150+
148151
}
149152
}
150153

0 commit comments

Comments
 (0)