Commit ecc0a879 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_gadget_interface_validator] Stop surcharging error message

parent 8a07c6e3
...@@ -43,16 +43,6 @@ ...@@ -43,16 +43,6 @@
return gadget_list; return gadget_list;
} }
function generateErrorMessage(error) {
var error_message = '';
error_message = error_message +
error.toString() +
(error.message !== undefined ? error.message : '') +
(error.status ? error.status.toString() + ' ' : '') +
(error.statusText !== undefined ? error.statusText : '');
return error_message;
}
function getInterfaceListFromURL(gadget_url) { function getInterfaceListFromURL(gadget_url) {
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
...@@ -82,10 +72,6 @@ ...@@ -82,10 +72,6 @@
} }
} }
return interface_list; return interface_list;
}, function (error) {
var message = "Error with loading the gadget data.\n";
error.message = message + generateErrorMessage(error);
throw error;
}); });
} }
...@@ -146,10 +132,6 @@ ...@@ -146,10 +132,6 @@
} }
next_element = next_element.nextElementSibling; next_element = next_element.nextElementSibling;
} }
}, function (error) {
var message = "Error with loading the interface data.\n";
error.message = message + generateErrorMessage(error);
throw error;
}); });
} }
...@@ -278,12 +260,7 @@ ...@@ -278,12 +260,7 @@
var interface_gadget = this; var interface_gadget = this;
return interface_gadget.declareGadget(gadget_url, { return interface_gadget.declareGadget(gadget_url, {
scope: gadget_url scope: gadget_url
}) });
.push(undefined, function (error) {
var message = "Error with loading the gadget.\n";
error.message = message + error.message;
throw error;
});
}) })
.declareMethod("getDeclaredGadgetInterfaceList", function (gadget_data) { .declareMethod("getDeclaredGadgetInterfaceList", function (gadget_data) {
...@@ -386,10 +363,6 @@ ...@@ -386,10 +363,6 @@
interface_data.method_list.push(method); interface_data.method_list.push(method);
} }
return interface_data; return interface_data;
}, function (error) {
var message = "Error with loading the interface data.\n";
error.message = message + generateErrorMessage(error);
throw error;
}); });
}) })
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.15707.16175.19985</string> </value> <value> <string>968.15711.48104.9642</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1529078216.58</float> <float>1529078407.64</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