inp.c, inp2q.c improve error message
when we exit() in batch mode due to a missing model definition
This commit is contained in:
parent
bb28578956
commit
d5b2460123
|
|
@ -927,8 +927,10 @@ inp_dodeck(
|
||||||
} /* for (dd = deck; dd; dd = dd->li_next) */
|
} /* for (dd = deck; dd; dd = dd->li_next) */
|
||||||
|
|
||||||
/* Stop here and exit if error occurred in batch mode */
|
/* Stop here and exit if error occurred in batch mode */
|
||||||
if (have_err && ft_batchmode)
|
if (have_err && ft_batchmode) {
|
||||||
|
fprintf(stderr, "\nngspice stopped due to error, no simulation run!\n");
|
||||||
controlled_exit(EXIT_BAD);
|
controlled_exit(EXIT_BAD);
|
||||||
|
}
|
||||||
|
|
||||||
/* Only print out netlist if brief is FALSE */
|
/* Only print out netlist if brief is FALSE */
|
||||||
if (!cp_getvar("brief", CP_BOOL, NULL)) {
|
if (!cp_getvar("brief", CP_BOOL, NULL)) {
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode)
|
||||||
IFnewUid(ckt, &uid, NULL, "Q", UID_MODEL, NULL);
|
IFnewUid(ckt, &uid, NULL, "Q", UID_MODEL, NULL);
|
||||||
IFC(newModel, (ckt, type, &(tab->defQmod), uid));
|
IFC(newModel, (ckt, type, &(tab->defQmod), uid));
|
||||||
err = TMALLOC(char, 70 + strlen(model));
|
err = TMALLOC(char, 70 + strlen(model));
|
||||||
(void) sprintf(err, "Unable to find definition of model %s - default BJT assumed \n", model);
|
(void) sprintf(err, "Unable to find definition of model %s\n", model);
|
||||||
LITERR(err);
|
LITERR(err);
|
||||||
tfree(err);
|
tfree(err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue