Ah, that is a good idea. I did it this way to match how the sonar works. It is returning the read value so it just returns infinity in erroneous conditions. This way math operations should still make sense afterwards. Since errors can be checked for by a call to I2CSucccess which has little overhead I didn't think it was necessary to return an error.