node-dualshock-controller
node-dualshock-controller copied to clipboard
unhandled error when controller is not present
currently exception is not handled. need to present with human readable error message as well
I have the same error. Is there something to do to avoid it?
Adding an error handler in linuxConnector.js
prevents the exception from being thrown, and the application keeps on running ;)
After this (around line 75):
controller = new joystick(0, 3500, 350);
add:
controller.on('error', function (err) {
console.log("Joystick error: ", err);
});
nice, will include.