diff --git a/CHANGELOG.md b/CHANGELOG.md index ca82973d..b8693765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Before releasing: - Fix error handling and error type variats in ADI bindings - Fix `AsynRobot` only running opcontrol +- Properly handle `EADDRINUSE` return for smart port errors (**Breaking Change**) (#97) ### Changed diff --git a/packages/pros/src/error.rs b/packages/pros/src/error.rs index c619f01d..4d0dd7bb 100644 --- a/packages/pros/src/error.rs +++ b/packages/pros/src/error.rs @@ -97,9 +97,12 @@ pub enum PortError { PortOutOfRange, /// The specified port couldn't be configured as the specified type. PortCannotBeConfigured, + /// The specified port is already being used or is mismatched. + AlreadyInUse, } map_errno!(PortError { ENXIO => Self::PortOutOfRange, ENODEV => Self::PortCannotBeConfigured, + EADDRINUSE => Self::AlreadyInUse, });