Currently in 2v12.58 it can't be catched.
It might be handled as a promise rejection - which is different to something that you catch with a try...catch?
promise rejection
try...catch
Specifically this code doesn't catch it. Do I need to do something different?
setInterval(() => { Bangle.getPressure().then(d => { console.log(d.temperature); }).catch(()=> { // THIS IS NEVER REACHED console.log("ERROR"); }); }, 10 * 1000);
@malaire started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It might be handled as a
promise rejection
- which is different to something that you catch with atry...catch
?