diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 6b08dff40..0fa8cc290 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -1836,10 +1836,17 @@ namespace Tango.Integration.Operation if (GradientGenerationConfiguration != null && GradientGenerationConfiguration.IsEnabled && segment.BrushStops.Count > 1) { LogManager.Log($"Generate segment {segment.SegmentIndex} gradient..."); - stops = GradientGenerationConfiguration.Generate(segment, job, processParameters, (e) => + try { - PreparingJobProgress?.Invoke(this, e); - }); + stops = GradientGenerationConfiguration.Generate(segment, job, processParameters, (e) => + { + PreparingJobProgress?.Invoke(this, e); + }); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Error occurred while trying to generate a gradient.\n{ex.Message}"); + } LogManager.Log($"Gradient generated."); PreparingJobProgress?.Invoke(this, new PreparingJobProgressEventArgs() |
