Make error message more verbose: Instead of only "no such parameter on this device",

give name of bad parameter and respective line in netlist.
This commit is contained in:
Holger Vogt 2022-07-18 23:28:51 +02:00
parent 73ee9e452d
commit 8a097c020e
2 changed files with 5 additions and 3 deletions

View File

@ -311,7 +311,7 @@ if_run(CKTcircuit *ckt, char *what, wordlist *args, INPtables *tab)
INPpas2(ckt, &deck, tab, ft_curckt->ci_specTask);
if (deck.error) {
fprintf(cp_err, "Warning: %s\n", deck.error);
fprintf(cp_err, "Error: %sin %s\n\n", deck.error, deck.line);
return 2;
}
}

View File

@ -25,8 +25,10 @@ INPapName(CKTcircuit *ckt, int type, JOB *analPtr, char *parmname,
if_parm = ft_find_analysis_parm(type, parmname);
if (!if_parm)
return (E_BADPARM);
if (!if_parm) {
fprintf(cp_err, "\n%s\n", parmname);
return (E_BADPARM);
}
return ft_sim->setAnalysisParm (ckt, analPtr,
if_parm->id,