Skip to content

Commit

Permalink
Get connectToSerialPort to rethrow its serial port opening error to h…
Browse files Browse the repository at this point in the history
…opefully improve error message generation on linux

- Changed error handling in `connectToSerialport.js` to throw exceptions instead of returning null on failure.
  • Loading branch information
obra committed Nov 26, 2024
1 parent 795b98c commit c1034dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/utils/connectToSerialport.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ export const connectToSerialport = async (targetVid, targetPid) => {
return focus;
} catch (e) {
logger.error("Failed to open serial port", e);
return null;
throw e;
}
};

0 comments on commit c1034dd

Please sign in to comment.