Browse Source

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

pre-master-46
Holger Vogt 5 years ago
parent
commit
7e01b800f0
  1. 6
      src/spicelib/parser/inpdpar.c

6
src/spicelib/parser/inpdpar.c

@ -87,6 +87,12 @@ INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast,
error = ft_sim->setInstanceParm (ckt, fast, p->id, val, NULL); error = ft_sim->setInstanceParm (ckt, fast, p->id, val, NULL);
if (error) { if (error) {
rtn = INPerror(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; goto quit;
} }

Loading…
Cancel
Save