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

Commit 0678c9a

Browse files
hlovdaladiazulay
authored andcommitted
Unify exit error message
1 parent b28f574 commit 0678c9a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/arduino/arduino.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,12 @@ export class ArduinoApp {
216216
}
217217
arduinoChannel.end(`Uploaded the sketch: ${dc.sketch}${os.EOL}`);
218218
}, (reason) => {
219-
arduinoChannel.error(`Exit with code=${reason.code}${os.EOL}`);
219+
const msg = reason.code ?
220+
`Exit with code=${reason.code}${os.EOL}` :
221+
reason.message ?
222+
reason.message :
223+
JSON.stringify(reason);
224+
arduinoChannel.error(msg);
220225
});
221226
}
222227

0 commit comments

Comments
 (0)