diff options
author | Hiroshi Ichikawa <gimite@gmail.com> | 2011-07-18 21:02:54 +0900 |
---|---|---|
committer | Hiroshi Ichikawa <gimite@gmail.com> | 2011-07-18 21:02:54 +0900 |
commit | 840bade50b095168e49992d1f8614ec189498c12 (patch) | |
tree | cf681d1831a8ab4c7cb773b4e94621d2bbdf40b1 | |
parent | 940e435d00ce3e40908f86650f265fbf6ba79a53 (diff) | |
download | web-socket-js-840bade50b095168e49992d1f8614ec189498c12.tar.gz |
Adding event.text to error message on IoError and SecurityError.
-rw-r--r-- | WebSocketMain.swf | bin | 175830 -> 175845 bytes | |||
-rw-r--r-- | WebSocketMainInsecure.zip | bin | 166610 -> 166515 bytes | |||
-rw-r--r-- | flash-src/WebSocket.as | 12 |
3 files changed, 8 insertions, 4 deletions
diff --git a/WebSocketMain.swf b/WebSocketMain.swf Binary files differindex 20a451f..5c8ab83 100644 --- a/WebSocketMain.swf +++ b/WebSocketMain.swf diff --git a/WebSocketMainInsecure.zip b/WebSocketMainInsecure.zip Binary files differindex 58e2a4e..e996b94 100644 --- a/WebSocketMainInsecure.zip +++ b/WebSocketMainInsecure.zip diff --git a/flash-src/WebSocket.as b/flash-src/WebSocket.as index 813f517..43b274a 100644 --- a/flash-src/WebSocket.as +++ b/flash-src/WebSocket.as @@ -208,9 +208,11 @@ public class WebSocket extends EventDispatcher { private function onSocketIoError(event:IOErrorEvent):void { var message:String; if (readyState == CONNECTING) { - message = "cannot connect to Web Socket server at " + url + " (IoError)"; + message = "cannot connect to Web Socket server at " + url + " (IoError: " + event.text + ")"; } else { - message = "error communicating with Web Socket server at " + url + " (IoError)"; + message = + "error communicating with Web Socket server at " + url + + " (IoError: " + event.text + ")"; } onError(message); } @@ -219,10 +221,12 @@ public class WebSocket extends EventDispatcher { var message:String; if (readyState == CONNECTING) { message = - "cannot connect to Web Socket server at " + url + " (SecurityError)\n" + + "cannot connect to Web Socket server at " + url + " (SecurityError: " + event.text + ")\n" + "make sure the server is running and Flash socket policy file is correctly placed"; } else { - message = "error communicating with Web Socket server at " + url + " (SecurityError)"; + message = + "error communicating with Web Socket server at " + url + + " (SecurityError: " + event.text + ")"; } onError(message); } |