Search Results

by sdeblois-itesmedia
Tue Jun 22, 2021 12:27 pm
Forum: Javascript
Topic: Few questions on how to handle errors
Replies: 6
Views: 15744

Re: Few questions on how to handle errors

Thanks for the details, I have validated the other two issues again and I seem to have found working solutions for both. The first issue from my original post seems to be fixed by using the onError method instead of catch, this seems like a bug considering the different results between node.js and a...
by sdeblois-itesmedia
Mon Jun 21, 2021 1:19 pm
Forum: Javascript
Topic: Few questions on how to handle errors
Replies: 6
Views: 15744

Re: Few questions on how to handle errors

I changed the data interval in my code to 50ms and added a sleep of 5s. This is enough if there is no movement in front of the device. But I was able to prevent the device from establishing its baseline by walking around the room, it was still throwing errors after 2 minutes and only stopped once I ...
by sdeblois-itesmedia
Fri Jun 18, 2021 1:41 pm
Forum: Javascript
Topic: Few questions on how to handle errors
Replies: 6
Views: 15744

Re: Few questions on how to handle errors

Thanks for the quick reply. 1. The catch method is correctly called on node.js but not on a browser, I have tried onError in a browser and it is not called either. 2 and 3. I have tried to set onSensorChange again after a reconnection and it's still not called. Here's the latest code that can be run...
by sdeblois-itesmedia
Fri Jun 18, 2021 12:12 pm
Forum: Javascript
Topic: Few questions on how to handle errors
Replies: 6
Views: 15744

Few questions on how to handle errors

Hello, I have a few use cases when an error occurs that I'm not sure how to handle and would like to know if there are any official recommendations. Here is the code I'm using: function runExample() { console.log('Running runExample'); var ch = new phidget22.VoltageInput(); ch.setIsHubPortDevice(tru...