add the parameter name to error message of missing or bad parameter

This commit is contained in:
Holger Vogt 2021-06-20 14:12:18 +02:00
parent 7eb791fe00
commit 7e01b800f0
1 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,12 @@ INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
error = ft_sim->setInstanceParm (ckt, fast, p->id, val, NULL);
if (error) {
rtn = INPerror(error);
if (rtn && error == E_BADPARM) {
/* add the parameter name to error message */
char* extended_rtn = tprintf("%s: %s", p->keyword, rtn);
tfree(rtn);
rtn = extended_rtn;
}
goto quit;
}