mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-21 17:07:55 +01:00
Log more information on AJAX failure and explicitly log when buffer is full.
This commit is contained in:
parent
4752199cfb
commit
656e37670e
@ -228,6 +228,7 @@ function Printer() {
|
|||||||
}
|
}
|
||||||
} else if (data.status == "fail") {
|
} else if (data.status == "fail") {
|
||||||
if (data.data.status == "buffer_full") {
|
if (data.data.status == "buffer_full") {
|
||||||
|
console.log("Printer:sendPrintPart: print server reported buffer full, pausing data transmission");
|
||||||
//this will wait in a setTimeout loop until enough room is available and then call sendPrintPart again.
|
//this will wait in a setTimeout loop until enough room is available and then call sendPrintPart again.
|
||||||
self.waitForBufferSpace(sendIndex, sendLength);
|
self.waitForBufferSpace(sendIndex, sendLength);
|
||||||
} else {
|
} else {
|
||||||
@ -248,8 +249,8 @@ function Printer() {
|
|||||||
self.startStatusCheckInterval();
|
self.startStatusCheckInterval();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).fail(function() {
|
}).fail(function(jqXHr, textStatus, errorThrown) {
|
||||||
console.log("Printer:sendPrintPart: failed");
|
console.log("Printer:sendPrintPart: failed (AJAX status: '" + textStatus + "') AJAX exception (if any):", errorThrown);
|
||||||
clearTimeout(self.retrySendPrintPartDelay);
|
clearTimeout(self.retrySendPrintPartDelay);
|
||||||
self.retrySendPrintPartDelay = setTimeout(function() {
|
self.retrySendPrintPartDelay = setTimeout(function() {
|
||||||
console.log("request printer:sendPrintPart failed retry");
|
console.log("request printer:sendPrintPart failed retry");
|
||||||
|
Loading…
Reference in New Issue
Block a user