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

Commit

Permalink
Unify exit error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hlovdal authored and adiazulay committed Jan 19, 2021
1 parent b28f574 commit 0678c9a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/arduino/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,12 @@ export class ArduinoApp {
}
arduinoChannel.end(`Uploaded the sketch: ${dc.sketch}${os.EOL}`);
}, (reason) => {
arduinoChannel.error(`Exit with code=${reason.code}${os.EOL}`);
const msg = reason.code ?
`Exit with code=${reason.code}${os.EOL}` :
reason.message ?
reason.message :
JSON.stringify(reason);
arduinoChannel.error(msg);
});
}

Expand Down

0 comments on commit 0678c9a

Please sign in to comment.