Reports whether a thrown value is an end device's error, and optionally which one.
What was caught.
Optional
The code to match, or any when omitted.
Whether it is that error.
try { device.send(2, reading, nowUs)} catch (error) { if (isDeviceError(error, 'Wait')) sleepUntil(error.untilUs) else throw error} Copy
try { device.send(2, reading, nowUs)} catch (error) { if (isDeviceError(error, 'Wait')) sleepUntil(error.untilUs) else throw error}
Reports whether a thrown value is an end device's error, and optionally which one.