summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Ichikawa <gimite@gmail.com>2011-07-18 21:02:54 +0900
committerHiroshi Ichikawa <gimite@gmail.com>2011-07-18 21:02:54 +0900
commit840bade50b095168e49992d1f8614ec189498c12 (patch)
treecf681d1831a8ab4c7cb773b4e94621d2bbdf40b1
parent940e435d00ce3e40908f86650f265fbf6ba79a53 (diff)
downloadweb-socket-js-840bade50b095168e49992d1f8614ec189498c12.tar.gz
Adding event.text to error message on IoError and SecurityError.
-rw-r--r--WebSocketMain.swfbin175830 -> 175845 bytes
-rw-r--r--WebSocketMainInsecure.zipbin166610 -> 166515 bytes
-rw-r--r--flash-src/WebSocket.as12
3 files changed, 8 insertions, 4 deletions
diff --git a/WebSocketMain.swf b/WebSocketMain.swf
index 20a451f..5c8ab83 100644
--- a/WebSocketMain.swf
+++ b/WebSocketMain.swf
Binary files differ
diff --git a/WebSocketMainInsecure.zip b/WebSocketMainInsecure.zip
index 58e2a4e..e996b94 100644
--- a/WebSocketMainInsecure.zip
+++ b/WebSocketMainInsecure.zip
Binary files differ
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);
}