inp.c, inp2q.c improve error message

when we exit() in batch mode due to a missing model definition
This commit is contained in:
h_vogt 2014-01-08 23:45:11 +01:00 committed by rlar
parent bb28578956
commit d5b2460123
2 changed files with 4 additions and 2 deletions

View File

@ -927,8 +927,10 @@ inp_dodeck(
} /* for (dd = deck; dd; dd = dd->li_next) */
/* 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);
}
/* Only print out netlist if brief is FALSE */
if (!cp_getvar("brief", CP_BOOL, NULL)) {

View File

@ -156,7 +156,7 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode)
IFnewUid(ckt, &uid, NULL, "Q", UID_MODEL, NULL);
IFC(newModel, (ckt, type, &(tab->defQmod), uid));
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);
tfree(err);
}