aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-05-05 20:05:52 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-05-05 20:05:52 +0300
commit903a2dbebb54f6539b14c2859bc30b752445d6b4 (patch)
tree934e955c85cc2c1de62d71af85792110dc1a6c01 /Software
parent8594795f820e03b988c37b9e5d9771670889074d (diff)
downloadTango-903a2dbebb54f6539b14c2859bc30b752445d6b4.tar.gz
Tango-903a2dbebb54f6539b14c2859bc30b752445d6b4.zip
Handle JobPrepare embedded returns error and abort job.
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 33c450856..b7885f985 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -2957,6 +2957,15 @@ namespace Tango.Integration.Operation
Timeout = TimeSpan.FromSeconds(10)
});
}
+ catch (ResponseErrorException ex)
+ {
+ LogManager.Log(ex, "Error sending job preparation request. Aborting job...");
+ UseKeepAlive = oldKeepAlive;
+ UpdateStatus(MachineStatuses.ReadyToDye);
+ OnPrintingFailed(handler, clonedJob, ex);
+ handler.RaiseFailed(ex);
+ return;
+ }
catch (Exception ex)
{
LogManager.Log(ex, "Error sending job preparation request.");