I guess things like getAPIP, getIP, getHostByName.
So they could all return null/undefined on error - maybe that's good enough? But if you want to return an error message then there really needs to be another way of doing it - and the way most NodeJS things do it (for better or worse) is function(err, data)
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.
I guess things like
getAPIP
,getIP
,getHostByName
.So they could all return null/undefined on error - maybe that's good enough? But if you want to return an error message then there really needs to be another way of doing it - and the way most NodeJS things do it (for better or worse) is
function(err, data)