Chronikis
Chronikis copied to clipboard
Need better error message for qp
Expected Behaviour
qp() currently only supports constant values for certain arguments, and should produce an error message stating this when a call to qp() has a non-constant expression for one of these arguments.
Actual Behaviour
When a non-constant value is passed for the argument period, the problem is not caught until a later stage of processing, producing the unhelpful error message "toModelBody requires an argument in BasicModel form."
Sample Code that illustrates the problem
def main(rhop: real{0.0, 1.0}, sigmap: real, period: real{0.0,})
=
ell = 0.7;
mindof = 6;
qp(period, ell, mindof, rhop, sigmap)