- in the 'cutout' Tcl command made sure that when an error pop-up then it returns with a "fail" string

- made sure when running scripts from the interface that if a command will generate an error then the script is aborted
This commit is contained in:
Marius Stanciu
2022-01-18 00:30:10 +02:00
committed by Marius
parent 87f1b7e15e
commit 3363dd0fe8
4 changed files with 18 additions and 3 deletions

View File

@@ -81,7 +81,11 @@ class TclCommandCutout(TclCommand):
dia_par = float(self.app.defaults["tools_cutout_tooldia"])
if 'gaps' in args:
gaps_par = args['gaps']
if args['gaps'] not in ["tb", "lr", "4", 4]:
self.raise_tcl_error(
"Incorrect -gaps values. Can be only a string from: 'tb', 'lr' and '4'.")
return "fail"
gaps_par = str(args['gaps'])
else:
gaps_par = str(self.app.defaults["tools_cutout_gaps_ff"])