Exceptions not being caught using rosbridge version 1.0
Hello,
I have been developing an HTML5/Javascript GUI using version 1.0 of rosbridge and most functions are working perfectly. However, I just noticed that my Javascript is not catching rosbridge exceptions where I assume they should occur. For example, if I follow the tutorial and run:
var connection = null;
try {
connection = new ros.Connection("ws://foobar:1234");
} catch (err) {
log('Failed to connect to rosbridge!');
return;
}
log('Connection successful!');
where neither host foobar nor the port 1234 is valid, I don't see the "Failed to connect" message. Instead I see the "Connection successful" message. Similar exceptions such as trying to connect to a non-existent service are not being caught. Is this a Javascript problem or a rosbridge problem?
Thanks!
patrick