Improve thee error message

This commit is contained in:
Holger Vogt 2025-12-05 20:08:42 +01:00
parent f4daa8ca99
commit c3b30f4611
1 changed files with 3 additions and 5 deletions

View File

@ -24,8 +24,8 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
switch(which) {
case HB_F1:
if (value->rValue < 0.0) {
errMsg = copy("Frequency 1 less than 0 is invalid for HB");
if (value->rValue <= 0.0) {
errMsg = copy("A positive fundamental frequency is required for HB");
job->HBFreq1 = 1.0;
return(E_PARMVAL);
}
@ -36,7 +36,7 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
case HB_F2:
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;
return(E_PARMVAL);
}
@ -44,8 +44,6 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value)
job->HBFreq2 = value->rValue;
break;
default:
return(E_BADPARM);
}