Commit a61949f5 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Try to raise an error in createSocket method before crashing the gadget

parent 0273cd7d
...@@ -99,7 +99,9 @@ ...@@ -99,7 +99,9 @@
</item> </item>
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string>/*jslint indent: 2*/\n <value> <string encoding="cdata"><![CDATA[
/*jslint indent: 2*/\n
/*global rJS, window, WebSocket, RSVP*/\n /*global rJS, window, WebSocket, RSVP*/\n
(function (rJS, window, WebSocket, RSVP) {\n (function (rJS, window, WebSocket, RSVP) {\n
"use strict";\n "use strict";\n
...@@ -162,10 +164,14 @@ ...@@ -162,10 +164,14 @@
}\n }\n
\n \n
function deferErrorHandler(error) {\n function deferErrorHandler(error) {\n
if ((!this.props.socket_defer.isFulfilled) && (!this.props.socket_defer.isRejected)) {\n
this.props.socket_defer.reject(error);\n
} else {\n
enqueueDefer(this, function () {\n enqueueDefer(this, function () {\n
throw error;\n throw error;\n
});\n });\n
}\n }\n
}\n
\n \n
function deferServerConnection(gadget) {\n function deferServerConnection(gadget) {\n
deferServerDisconnection(gadget);\n deferServerDisconnection(gadget);\n
...@@ -231,7 +237,9 @@ ...@@ -231,7 +237,9 @@
});\n });\n
\n \n
}(rJS, window, WebSocket, RSVP));\n }(rJS, window, WebSocket, RSVP));\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -366,7 +374,7 @@ ...@@ -366,7 +374,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.9453.27218.15667</string> </value> <value> <string>945.18210.63502.24746</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -384,7 +392,7 @@ ...@@ -384,7 +392,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1439904827.73</float> <float>1440430322.74</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
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