@tve there's nothing in there for text errors at the moment - you just have to return a negative number, so you could have different numbers for different errors. Maybe a errorNumberToString type function could be added? Or maybe just getLastErrorString is easier - but then it probably requires a string buffer in RAM somewhere.
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.
@tve there's nothing in there for text errors at the moment - you just have to return a negative number, so you could have different numbers for different errors. Maybe a
errorNumberToString
type function could be added? Or maybe justgetLastErrorString
is easier - but then it probably requires a string buffer in RAM somewhere.