Improve thee error message
This commit is contained in:
parent
f4daa8ca99
commit
c3b30f4611
|
|
@ -24,8 +24,8 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
|
||||||
switch(which) {
|
switch(which) {
|
||||||
|
|
||||||
case HB_F1:
|
case HB_F1:
|
||||||
if (value->rValue < 0.0) {
|
if (value->rValue <= 0.0) {
|
||||||
errMsg = copy("Frequency 1 less than 0 is invalid for HB");
|
errMsg = copy("A positive fundamental frequency is required for HB");
|
||||||
job->HBFreq1 = 1.0;
|
job->HBFreq1 = 1.0;
|
||||||
return(E_PARMVAL);
|
return(E_PARMVAL);
|
||||||
}
|
}
|
||||||
|
|
@ -36,7 +36,7 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
|
||||||
|
|
||||||
case HB_F2:
|
case HB_F2:
|
||||||
if (value->rValue < 0.0) {
|
if (value->rValue < 0.0) {
|
||||||
errMsg = copy("Frequency 2 less than 0 is invalid for HB");
|
errMsg = copy("A negative second frequency is invalid for multitone HB");
|
||||||
job->HBFreq2 = 1.0;
|
job->HBFreq2 = 1.0;
|
||||||
return(E_PARMVAL);
|
return(E_PARMVAL);
|
||||||
}
|
}
|
||||||
|
|
@ -44,8 +44,6 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
|
||||||
job->HBFreq2 = value->rValue;
|
job->HBFreq2 = value->rValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return(E_BADPARM);
|
return(E_BADPARM);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue