Commit a64b6ba6 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Only catch timeout error

parent 8c1f381b
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
COMMAND_SELECTION_NEXT = "selection_next", COMMAND_SELECTION_NEXT = "selection_next",
COMMAND_HISTORY_PREVIOUS = "history_previous", COMMAND_HISTORY_PREVIOUS = "history_previous",
COMMAND_PUSH_HISTORY = "push_history", COMMAND_PUSH_HISTORY = "push_history",
REDIRECT_TIMEOUT = 5000, REDIRECT_TIMEOUT = 5055,
VALID_URL_COMMAND_DICT = {}; VALID_URL_COMMAND_DICT = {};
VALID_URL_COMMAND_DICT[COMMAND_DISPLAY_STATE] = null; VALID_URL_COMMAND_DICT[COMMAND_DISPLAY_STATE] = null;
VALID_URL_COMMAND_DICT[COMMAND_DISPLAY_STORED_STATE] = null; VALID_URL_COMMAND_DICT[COMMAND_DISPLAY_STORED_STATE] = null;
...@@ -63,8 +63,11 @@ ...@@ -63,8 +63,11 @@
.push(function () { .push(function () {
return RSVP.timeout(REDIRECT_TIMEOUT); return RSVP.timeout(REDIRECT_TIMEOUT);
}) })
.push(undefined, function () { .push(undefined, function (error) {
if (error === 'Timed out after ' + REDIRECT_TIMEOUT + ' ms') {
throw new Error('URL handling timeout. From: "' + from_hash + '" to: "' + to_hash + '" and current: "' + window.location.hash + '"'); throw new Error('URL handling timeout. From: "' + from_hash + '" to: "' + to_hash + '" and current: "' + window.location.hash + '"');
}
throw error;
}); });
} }
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.5859.60284.2696</string> </value> <value> <string>952.11450.4967.32904</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1467117724.53</float> <float>1467212877.23</float>
<string>UTC</string> <string>UTC</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