Commit 14355cb2 authored by Joel Martin's avatar Joel Martin

Give better exception feedback in message handler.

parent 30298582
...@@ -956,7 +956,13 @@ recv_message: function(e) { ...@@ -956,7 +956,13 @@ recv_message: function(e) {
RFB.handle_message(); RFB.handle_message();
} }
} catch (exc) { } catch (exc) {
console.log("recv_message, caught exception: " + exc); if (typeof exc.stack !== 'undefined') {
console.log("recv_message, caught exception: " + exc.stack);
} else if (typeof exc.description !== 'undefined') {
console.log("recv_message, caught exception: " + exc.description);
} else {
console.log("recv_message, caught exception:" + exc);
}
if (typeof exc.name !== 'undefined') { if (typeof exc.name !== 'undefined') {
RFB.updateState('failed', exc.name + ": " + exc.message); RFB.updateState('failed', exc.name + ": " + exc.message);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment