That's interesting - that behaviour is expected though.
The error callback will get called in case of connection errors, but not for an error like that which is caused by a call on the socket.
While it makes sense to have it behave the same as Node.js, I'd say the current behaviour is actually pretty useful - it really helps to have a stack trace from the offending line of code.
© Espruino, powered by microcosm.
Report a problem