mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Tweaked one_defined to give a better message when nothing was defined
This commit is contained in:
parent
0256f582e5
commit
777facc9a2
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ function one_defined(vars, names, required=true) =
|
|||
let (
|
||||
ok = num_defined(vars)==1 || (!required && num_defined(vars)==0)
|
||||
)
|
||||
assert(ok,str("Must define ",required?"exactly":"at most"," one of ",[for(i=[0:len(vars)]) if (is_def(vars[i])) names[i]]))
|
||||
assert(ok,str("Must define ",required?"exactly":"at most"," one of ",num_defined(vars)==0?names:[for(i=[0:len(vars)]) if (is_def(vars[i])) names[i]]))
|
||||
first_defined(vars);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue