Browse Source

Add another error qualifier to decribe the current policy

when a doubling token exists (or is created) in the netlist.
pre-master-46
Holger Vogt 3 years ago
parent
commit
b6e9ba20b9
  1. 3
      src/include/ngspice/iferrmsg.h
  2. 2
      src/spicelib/devices/cktcrte.c
  3. 5
      src/spicelib/parser/sperror.c

3
src/include/ngspice/iferrmsg.h

@ -34,7 +34,8 @@ Author: 1986 Thomas L. Quarles
#define E_NOCHANGE 13 /* simulator can't tolerate any more topology changes */
#define E_NOTFOUND 14 /* simulator can't find something it was looking for */
#define E_BAD_DOMAIN 15 /* output interface begin/end domain calls mismatched */
#define E_EXISTS_BAD 16 /* error - attempt to create duplicate */
/* instance or model. Bail out. */
#define E_PRIVATE 100 /* messages above this number are private to */
/* the simulator and MUST be accompanied by */

2
src/spicelib/devices/cktcrte.c

@ -32,7 +32,7 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *modPtr, GENinstance **inInstPtr, IFuid name
if (instPtr) {
if (inInstPtr)
*inInstPtr = instPtr;
return E_EXISTS;
return E_EXISTS_BAD;
}
type = modPtr->GENmodType;

5
src/spicelib/parser/sperror.c

@ -29,7 +29,10 @@ const char *SPerror(int type)
case E_EXISTS:
msg = "device already exists, existing one being used";
break;
case E_NODEV:
case E_EXISTS_BAD:
msg = "device already exists, bail out";
break;
case E_NODEV:
msg = "no such device";
break;
case E_NOMOD:

Loading…
Cancel
Save