                 
                 let response = i2c_smbus_write_quick(i2c, UInt8(I2C_SMBUS_WRITE))
                 if response < 0 {
-                    throw I2CError.noAckError(response)
+                    throw I2CError.noAckError(response, errno)
                 }
                 return []
             }

            }
            let status = ioctl(i2c, UInt(I2C_SLAVE), CInt(newAddress))
            guard status == 0 else {
                throw I2CError.slaveAddressSetError(status)
            }
            self.currentAddress = newAddress
        }

        public init(portNumber: UInt8) throws {
            let fd = open("/dev/i2c-\(portNumber)", O_RDWR)
            guard fd != -1 else {
                throw I2CError.deviceOpenError(portNumber: portNumber, returns: fd, errno: errno)
            }
            self.i2c = fd
        }
