mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
bitbake: toaster: Improve client side error handling
Make use of the toastermain.settings.DEBUG flag to toggle the client side error logging. Make the error logging consistent by using console.warn/error across the project, this adds traceability to the warnings. Also handles the case where console is not available by stubbing it in libtoaster. (Bitbake rev: c34ebc51a6cbf90c64ef1ac461e475c6341f0f2a) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2e26745a13
commit
ed9fa17467
@@ -126,15 +126,15 @@ function _makeXHREditCall(data, onsuccess, onfail) {
|
||||
headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
|
||||
success: function (_data) {
|
||||
if (_data.error != "ok") {
|
||||
alert(_data.error);
|
||||
console.warn(_data.error);
|
||||
} else {
|
||||
updateButtons(_data.layers.map(function (e) {return e.id}));
|
||||
if (onsuccess != undefined) onsuccess(_data);
|
||||
}
|
||||
},
|
||||
error: function (_data) {
|
||||
alert("Call failed");
|
||||
console.log(_data);
|
||||
console.warn("Call failed");
|
||||
console.warn(_data);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -215,7 +215,7 @@ function layerAdd(layerId, layerName, layerURL) {
|
||||
data: {'type': 'layerdeps','value':layerId},
|
||||
success: function(_data) {
|
||||
if (_data.error != "ok") {
|
||||
alert(_data.error);
|
||||
console.warn(_data.error);
|
||||
} else {
|
||||
updateLayerCountLabels(_data.list.length+1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user