Commit 76ed33d3 authored by Roque's avatar Roque

erp5_web_monitoring: fix error catch

parent ff624fd2
Pipeline #37846 failed with stage
in 0 seconds
/*global window, rJS */ /*global window, rJS, jIO */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS) { (function (window, rJS, jIO) {
"use strict"; "use strict";
rJS(window) rJS(window)
...@@ -16,9 +16,13 @@ ...@@ -16,9 +16,13 @@
var gadget = this; var gadget = this;
return gadget.jio_remove(options.jio_key) return gadget.jio_remove(options.jio_key)
.push(function () { .push(function () {
return gadget.notifySubmitted({message: "Document Deleted", status: "success"}) return gadget.notifySubmitted({message: "Document Deleted", status: "success"});
}, function (error) { }, function (error) {
return gadget.notifySubmitted({message: error.message, status: "error"}) if (error instanceof jIO.util.jIOError) {
return gadget.notifySubmitted({message: error.message, status: "error"});
} else {
throw error;
}
}) })
.push(function () { .push(function () {
return gadget.redirect({command: 'change', options: { return gadget.redirect({command: 'change', options: {
...@@ -26,4 +30,4 @@ ...@@ -26,4 +30,4 @@
}}); }});
}); });
}, {mutex: 'render'}); }, {mutex: 'render'});
}(window, rJS)); }(window, rJS, jIO));
\ No newline at end of file
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1020.22291.41890.38485</string> </value> <value> <string>1020.29408.38904.22562</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1730318970.28</float> <float>1730743757.03</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