Browse Source

inp.c, inp2q.c improve error message

when we exit() in batch mode due to a missing model definition
pre-master-46
h_vogt 12 years ago
committed by rlar
parent
commit
d5b2460123
  1. 4
      src/frontend/inp.c
  2. 2
      src/spicelib/parser/inp2q.c

4
src/frontend/inp.c

@ -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)) {

2
src/spicelib/parser/inp2q.c

@ -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);
}

Loading…
Cancel
Save