Commit b926f062 authored by Frantisek Kobzik's avatar Frantisek Kobzik Committed by Jeremy White

SPICE-HTML5: Improve error message

Current error message in SPICE-HTML5 error is poor (error-logging function
prints error.toString() which doesn't contain anything detailed).

This patch enhances this message in the following way:
 - error event contains target attribute ([1]),
 - the code in this patch checks for presence of 'url' attribute (which is
   contained in WebSocket object[2]). If the target contains url then
   meaningful message is logged.

parent dea87ff9
......@@ -78,7 +78,9 @@ function SpiceConn(o)
this.parent.state = "start";
});'error', function(e) {
this.parent.log_err(">> WebSockets.onerror" + e.toString());
if ('url' in {
this.parent.log_err("WebSocket error: Can't connect to websocket on URL: " +;
});'close', function(e) {
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