Sorry for the barrage of questions, I hope it's OK.
Any wisdom about jsError vs. jsException? I see a bit of a mix in the codebase for situations where, for example, a callback argument is not actually a function, or a password is required but not provided.
My intuition would be to use an error when the program code is incorrect, such as not providing required arguments and to use exceptions when a dynamic error state is encountered that may be fixed, such as trying to send on a socket and the socket got closed in the meantime.
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.
Sorry for the barrage of questions, I hope it's OK.
Any wisdom about jsError vs. jsException? I see a bit of a mix in the codebase for situations where, for example, a callback argument is not actually a function, or a password is required but not provided.
My intuition would be to use an error when the program code is incorrect, such as not providing required arguments and to use exceptions when a dynamic error state is encountered that may be fixed, such as trying to send on a socket and the socket got closed in the meantime.