Commit 68a585a4 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Increase URL timeout error verbosity

parent fbb50a50
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
return window.location.replace(hash); return window.location.replace(hash);
} }
function timeoutUrlChange() { function timeoutUrlChange(from_hash, to_hash) {
// prevent returning unexpected response // prevent returning unexpected response
// wait for the hash change to occur // wait for the hash change to occur
// fail if nothing happens // fail if nothing happens
...@@ -64,13 +64,14 @@ ...@@ -64,13 +64,14 @@
return RSVP.timeout(REDIRECT_TIMEOUT); return RSVP.timeout(REDIRECT_TIMEOUT);
}) })
.push(undefined, function () { .push(undefined, function () {
throw new Error('URL handling timeout: ' + window.location.hash); throw new Error('URL handling timeout. From: "' + from_hash + '" to: "' + to_hash + '" and current: "' + window.location.hash + '"');
}); });
} }
function synchronousChangeState(hash) { function synchronousChangeState(hash) {
var from_hash = window.location.hash;
changeState(hash); changeState(hash);
return timeoutUrlChange(); return timeoutUrlChange(from_hash, hash);
} }
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
...@@ -835,8 +836,9 @@ ...@@ -835,8 +836,9 @@
delete options.form_content; delete options.form_content;
return this.getCommandUrlFor(options) return this.getCommandUrlFor(options)
.push(function (hash) { .push(function (hash) {
var from_hash = window.location.hash;
window.location.replace(hash); window.location.replace(hash);
return timeoutUrlChange(); return timeoutUrlChange(from_hash, hash);
}); });
}) })
......
...@@ -66,7 +66,9 @@ ...@@ -66,7 +66,9 @@
<item> <item>
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple/> <tuple>
<string>classification/collaborative/team</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
...@@ -185,7 +187,7 @@ ...@@ -185,7 +187,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1465381422.0</float> <float>1447177687.37</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -230,7 +232,7 @@ ...@@ -230,7 +232,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.10286.2333.57753</string> </value> <value> <string>952.5859.60284.2696</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +250,7 @@ ...@@ -248,7 +250,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1467047937.65</float> <float>1467117724.53</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