Closed bobrippling closed 6 months ago
Looks like there's a build error here as well? https://github.com/espruino/Espruino/actions/runs/7112131428/job/19361472245?pr=2438
edit: ahh - you made a comment about this above
This is ready for another look btw :)
Thanks - just looked again and this looks good! Merging now!
This handles an I2C error, originally ocurring in #2137, found again by chance in an unrelated PR.
When we create a promise for
getPressure
, we now look at bothjspGetException
and thenjspHasError
(separately). If the former is null but we have an error, we raise an exception about the I2C communication with the barometer.Previous behaviour would raise an exception with no payload, leading to the
Uncaught Error: Unhandled promise rejection: undefined
seen in the BangleApps pull request above.