public override void CloseConnection() { try { device.Close(); } catch (Exception ex) { throw new Exception($"There was an error with the {_sensorType} sensor connected to port {hubPort} on hub: {hubName}. Check connections and try again. \n \n System Error Message: \n" + ex.Message); } }