There's no close callback, but you could probably hook onto the event if needed.
try...catch works fine, but the error isn't happening at that point in your code. Because it's async the error happens at some point when the rest of your code is idling.
Is it possible to post up a complete set of code that gives you the problem? Ideally as minimal as possible.
I'm a bit confused since the error that's being reported in MQTT points to lines that don't actually exist in the MQTT module on Espruino.com: http://www.espruino.com/modules/MQTT.minĀ.js
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.
There's no
close
callback, but you could probably hook onto the event if needed.try...catch
works fine, but the error isn't happening at that point in your code. Because it's async the error happens at some point when the rest of your code is idling.Is it possible to post up a complete set of code that gives you the problem? Ideally as minimal as possible.
I'm a bit confused since the error that's being reported in MQTT points to lines that don't actually exist in the MQTT module on Espruino.com: http://www.espruino.com/modules/MQTT.minĀ.js
Are you using your own version of the modules?