File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -50,9 +50,7 @@ Ports() = default;
5050 * @brief Scans the system for available serial ports
5151 *
5252 * @return uint16_t The number of serial ports found
53- * @throws SerialException if scanning fails
5453 * @throws SerialException if no ports are found
55- * @throws PermissionDeniedException if insufficient permissions
5654 */
5755uint16_t scanPorts ();
5856
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ uint16_t Ports::scanPorts() {
2626 const char * by_id_dir = kSysSerialByIdPath ;
2727 DIR* dir = opendir (by_id_dir);
2828 if (!dir) {
29- std::cout << " No serial devices directory: " << by_id_dir << " \n " ;
30- return -1 ;
29+ throw SerialException (" Error while reading " + std::string (by_id_dir) + " : " + strerror (errno));
3130 }
3231
3332 // The POSIX directory-entry structure used by readdir() to describe files
You can’t perform that action at this time.
0 commit comments